Add `C-j` and `C-k` to keybinds for picker (#876)

* Add `C-j` and `C-k` for moving down/up in pickers

* Add new binds to keymap doc
imgbot
VuiMuich 3 years ago committed by GitHub
parent 1766bdb9d4
commit 67829976fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -244,8 +244,8 @@ Keys to use within picker. Remapping currently not supported.
| Key | Description | | Key | Description |
| ----- | ------------- | | ----- | ------------- |
| `Up`, `Ctrl-p` | Previous entry | | `Up`, `Ctrl-k`, `Ctrl-p` | Previous entry |
| `Down`, `Ctrl-n` | Next entry | | `Down`, `Ctrl-j`, `Ctrl-n` | Next entry |
| `Ctrl-space` | Filter options | | `Ctrl-space` | Filter options |
| `Enter` | Open selected | | `Enter` | Open selected |
| `Ctrl-h` | Open horizontally | | `Ctrl-h` | Open horizontally |

@ -336,6 +336,10 @@ impl<T: 'static> Component for Picker<T> {
code: KeyCode::BackTab, code: KeyCode::BackTab,
.. ..
} }
| KeyEvent {
code: KeyCode::Char('k'),
modifiers: KeyModifiers::CONTROL,
}
| KeyEvent { | KeyEvent {
code: KeyCode::Char('p'), code: KeyCode::Char('p'),
modifiers: KeyModifiers::CONTROL, modifiers: KeyModifiers::CONTROL,
@ -349,6 +353,10 @@ impl<T: 'static> Component for Picker<T> {
| KeyEvent { | KeyEvent {
code: KeyCode::Tab, .. code: KeyCode::Tab, ..
} }
| KeyEvent {
code: KeyCode::Char('j'),
modifiers: KeyModifiers::CONTROL,
}
| KeyEvent { | KeyEvent {
code: KeyCode::Char('n'), code: KeyCode::Char('n'),
modifiers: KeyModifiers::CONTROL, modifiers: KeyModifiers::CONTROL,

Loading…
Cancel
Save