on master help sign in
Add `C-j` and `C-k` to keybinds for picker (#876)
6782997VuiMuich
book/src/keymap.md+9−9
@@ -242,12 +242,12 @@ commands (including goto) to extend the existing selection instead of replacing
242
242
243Keys to use within picker. Remapping currently not supported.
243Keys to use within picker. Remapping currently not supported.
244
244
245−| Key | Description |
245+| Key | Description |
246−| ----- | ------------- |
246+| ----- | ------------- |
247−| `Up`, `Ctrl-p` | Previous entry |
247+| `Up`, `Ctrl-k`, `Ctrl-p` | Previous entry |
248−| `Down`, `Ctrl-n` | Next entry |
248+| `Down`, `Ctrl-j`, `Ctrl-n` | Next entry |
249−| `Ctrl-space` | Filter options |
249+| `Ctrl-space` | Filter options |
250−| `Enter` | Open selected |
250+| `Enter` | Open selected |
251−| `Ctrl-h` | Open horizontally |
251+| `Ctrl-h` | Open horizontally |
252−| `Ctrl-v` | Open vertically |
252+| `Ctrl-v` | Open vertically |
253−| `Escape`, `Ctrl-c` | Close picker |
253+| `Escape`, `Ctrl-c` | Close picker |
helix-term/src/ui/picker.rs+8
@@ -336,6 +336,10 @@ impl<T: 'static> Component for Picker<T> {
336 code: KeyCode::BackTab,
336 code: KeyCode::BackTab,
337 ..
337 ..
338 }
338 }
339+ | KeyEvent {
340+ code: KeyCode::Char('k'),
341+ modifiers: KeyModifiers::CONTROL,
342+ }
339 | KeyEvent {
343 | KeyEvent {
340 code: KeyCode::Char('p'),
344 code: KeyCode::Char('p'),
341 modifiers: KeyModifiers::CONTROL,
345 modifiers: KeyModifiers::CONTROL,
@@ -349,6 +353,10 @@ impl<T: 'static> Component for Picker<T> {
349 | KeyEvent {
353 | KeyEvent {
350 code: KeyCode::Tab, ..
354 code: KeyCode::Tab, ..
351 }
355 }
356+ | KeyEvent {
357+ code: KeyCode::Char('j'),
358+ modifiers: KeyModifiers::CONTROL,
359+ }
352 | KeyEvent {
360 | KeyEvent {
353 code: KeyCode::Char('n'),
361 code: KeyCode::Char('n'),
354 modifiers: KeyModifiers::CONTROL,
362 modifiers: KeyModifiers::CONTROL,