gitui
gitui copied to clipboard
hjkl bindings don't work m1 mac 12.4
Describe the bug
After enabling the key configuration as noted in the documentation, I am still unable to use hjkl to navigate. There is another similar issue #1202, but I have verified that my configuration should be correct.
To Reproduce
- Create file ~/.config/gitui/key_bindings.ron with below contents.
- Run
gitui
Navigation is still with arrows and hjkl has no effect.
~/.config/gitui/key_bindings.ron
(
focus_right: Some(( code: Char(l), modifiers: ( bits: 0,),)),
focus_left: Some(( code: Char(h), modifiers: ( bits: 0,),)),
focus_above: Some(( code: Char(k), modifiers: ( bits: 0,),)),
focus_below: Some(( code: Char(j), modifiers: ( bits: 0,),)),
move_left: Some(( code: Char(h), modifiers: ( bits: 0,),)),
move_right: Some(( code: Char(l), modifiers: ( bits: 0,),)),
move_up: Some(( code: Char(k), modifiers: ( bits: 0,),)),
move_down: Some(( code: Char(j), modifiers: ( bits: 0,),)),
open_help: Some(( code: F(1), modifiers: ( bits: 0,),)),
)
Expected behavior
hkjl move cursor and selections as arrows do.
Context (please complete the following information):
- OS/Distro + Version: m1 mac os Monterey 12.4
- GitUI Version: 0.20.1
- Rust version: 1.62.0
- installed via brew
- wezterm 20220408-101518-b908e2dd
Key bindings Char codes use a char type (i.e. quote marks). This works:
(
focus_right: Some(( code: Char('l'), modifiers: ( bits: 0,),)),
focus_left: Some(( code: Char('h'), modifiers: ( bits: 0,),)),
focus_above: Some(( code: Char('k'), modifiers: ( bits: 0,),)),
focus_below: Some(( code: Char('j'), modifiers: ( bits: 0,),)),
move_left: Some(( code: Char('h'), modifiers: ( bits: 0,),)),
move_right: Some(( code: Char('l'), modifiers: ( bits: 0,),)),
move_up: Some(( code: Char('k'), modifiers: ( bits: 0,),)),
move_down: Some(( code: Char('j'), modifiers: ( bits: 0,),)),
open_help: Some(( code: F(1), modifiers: ( bits: 0,),)),
)
Wow. I always mess up some mundane detail. :) Thank you. Works like a charm.