Match keybindings of menu

This commit is contained in:
Kevin Sjöberg 2021-06-08 20:50:23 +02:00 committed by Blaž Hrastnik
parent 29962a5bd9
commit 1bb9977faf

View file

@ -151,7 +151,11 @@ fn handle_event(&mut self, event: Event, cx: &mut Context) -> EventResult {
code: KeyCode::Up, ..
}
| KeyEvent {
code: KeyCode::Char('k'),
code: KeyCode::BackTab,
..
}
| KeyEvent {
code: KeyCode::Char('p'),
modifiers: KeyModifiers::CONTROL,
} => self.move_up(),
KeyEvent {
@ -159,11 +163,18 @@ fn handle_event(&mut self, event: Event, cx: &mut Context) -> EventResult {
..
}
| KeyEvent {
code: KeyCode::Char('j'),
code: KeyCode::Tab, ..
}
| KeyEvent {
code: KeyCode::Char('n'),
modifiers: KeyModifiers::CONTROL,
} => self.move_down(),
KeyEvent {
code: KeyCode::Esc, ..
}
| KeyEvent {
code: KeyCode::Char('c'),
modifiers: KeyModifiers::CONTROL,
} => {
return close_fn;
}