Yes/No dialogs are now answerable by pressing Y or N on your keyboard

This commit is contained in:
veeso
2022-08-30 15:29:34 +02:00
parent 96df152220
commit 6a5c248d35
7 changed files with 103 additions and 5 deletions

View File

@@ -58,6 +58,14 @@ impl Component<Msg, NoUserEvent> for DelSshKeyPopup {
self.perform(Cmd::Move(Direction::Right));
Some(Msg::None)
}
Event::Keyboard(KeyEvent {
code: Key::Char('y'),
modifiers: KeyModifiers::NONE,
}) => Some(Msg::Ssh(SshMsg::DeleteSshKey)),
Event::Keyboard(KeyEvent {
code: Key::Char('n'),
modifiers: KeyModifiers::NONE,
}) => Some(Msg::Ssh(SshMsg::CloseDelSshKeyPopup)),
Event::Keyboard(KeyEvent {
code: Key::Enter, ..
}) => {