Skip to content

Commit

Permalink
feat: press X to clear keyboard contents (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
goweiwen committed Oct 23, 2023
1 parent 1209816 commit 86bf822
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/src/view/input/keyboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ impl View for Keyboard {
bubble.push_back(Command::CloseView);
commands.send(Command::Redraw).await?;
}
KeyEvent::Pressed(Key::X) => {
self.value.clear();
self.dirty = true;
}
KeyEvent::Pressed(Key::Select) => {
self.mode = match self.mode {
KeyboardMode::Lowercase => KeyboardMode::Uppercase,
Expand Down

0 comments on commit 86bf822

Please sign in to comment.