on master help sign in
Add c-j c-k to menu keymap for move_up move_down (#908)
commitbca98b5bedfa6c9410384f26a2df6115874351bc authorCossonLeo <20379044+cossonleo@users.noreply.github.com> dateTue 26 Oct 2021, 08:42 (5 years ago) parenta0cb9d8
1 file changed+8
helix-term/src/ui/menu.rs+8
helix-term/src/ui/menu.rs+8
@@ -214,6 +214,10 @@ impl<T: Item + 'static> Component for Menu<T> {
214214 | KeyEvent {
215215 code: KeyCode::Char('p'),
216216 modifiers: KeyModifiers::CONTROL,
217+ }
218+ | KeyEvent {
219+ code: KeyCode::Char('k'),
220+ modifiers: KeyModifiers::CONTROL,
217221 } => {
218222 self.move_up();
219223 (self.callback_fn)(cx.editor, self.selection(), MenuEvent::Update);
@@ -231,6 +235,10 @@ impl<T: Item + 'static> Component for Menu<T> {
231235 | KeyEvent {
232236 code: KeyCode::Char('n'),
233237 modifiers: KeyModifiers::CONTROL,
238+ }
239+ | KeyEvent {
240+ code: KeyCode::Char('j'),
241+ modifiers: KeyModifiers::CONTROL,
234242 } => {
235243 self.move_down();
236244 (self.callback_fn)(cx.editor, self.selection(), MenuEvent::Update);