|
|
@ -214,6 +214,10 @@ impl<T: Item + 'static> Component for Menu<T> {
|
|
|
|
| KeyEvent {
|
|
|
|
| KeyEvent {
|
|
|
|
code: KeyCode::Char('p'),
|
|
|
|
code: KeyCode::Char('p'),
|
|
|
|
modifiers: KeyModifiers::CONTROL,
|
|
|
|
modifiers: KeyModifiers::CONTROL,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
| KeyEvent {
|
|
|
|
|
|
|
|
code: KeyCode::Char('k'),
|
|
|
|
|
|
|
|
modifiers: KeyModifiers::CONTROL,
|
|
|
|
} => {
|
|
|
|
} => {
|
|
|
|
self.move_up();
|
|
|
|
self.move_up();
|
|
|
|
(self.callback_fn)(cx.editor, self.selection(), MenuEvent::Update);
|
|
|
|
(self.callback_fn)(cx.editor, self.selection(), MenuEvent::Update);
|
|
|
@ -231,6 +235,10 @@ impl<T: Item + 'static> Component for Menu<T> {
|
|
|
|
| KeyEvent {
|
|
|
|
| KeyEvent {
|
|
|
|
code: KeyCode::Char('n'),
|
|
|
|
code: KeyCode::Char('n'),
|
|
|
|
modifiers: KeyModifiers::CONTROL,
|
|
|
|
modifiers: KeyModifiers::CONTROL,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
| KeyEvent {
|
|
|
|
|
|
|
|
code: KeyCode::Char('j'),
|
|
|
|
|
|
|
|
modifiers: KeyModifiers::CONTROL,
|
|
|
|
} => {
|
|
|
|
} => {
|
|
|
|
self.move_down();
|
|
|
|
self.move_down();
|
|
|
|
(self.callback_fn)(cx.editor, self.selection(), MenuEvent::Update);
|
|
|
|
(self.callback_fn)(cx.editor, self.selection(), MenuEvent::Update);
|
|
|
|