bd20328e6534345b0696f9b2149f7677d369b679
dblume Improved vim key bindings f...

dblume authored 1 year ago

1) // bit for modifiers
2) // bits: 0  None 
3) // bits: 1  SHIFT
4) // bits: 2  CONTROL
5) //
6) // Note:
7) // If the default key layout is lower case,
8) // and you want to use `Shift + q` to trigger the exit event,
9) // the setting should like this `exit: Some(( code: Char('Q'), modifiers: ( bits: 1,),)),`
10) // The Char should be upper case, and the shift modified bit should be set to 1.
11) //
12) // Note:
13) // find `KeysList` type in src/keys/key_list.rs for all possible keys.
14) // every key not overwritten via the config file will use the default specified there
dblume Add key bindings for gitui

dblume authored 1 year ago

15) (
16)     focus_right: Some(( code: Char('l'), modifiers: ( bits: 0,),)),
17)     focus_left: Some(( code: Char('h'), modifiers: ( bits: 0,),)),
18)     focus_above: Some(( code: Char('k'), modifiers: ( bits: 0,),)),
19)     focus_below: Some(( code: Char('j'), modifiers: ( bits: 0,),)),
dblume Improved vim key bindings f...

dblume authored 1 year ago

20) 
21)     open_help: Some(( code: F(1), modifiers: ( bits: 0,),)),
22) 
dblume Add key bindings for gitui

dblume authored 1 year ago

23)     move_left: Some(( code: Char('h'), modifiers: ( bits: 0,),)),
24)     move_right: Some(( code: Char('l'), modifiers: ( bits: 0,),)),
25)     move_up: Some(( code: Char('k'), modifiers: ( bits: 0,),)),
26)     move_down: Some(( code: Char('j'), modifiers: ( bits: 0,),)),
dblume Improved vim key bindings f...

dblume authored 1 year ago

27)     popup_up: Some(( code: Char('p'), modifiers: ( bits: 2,),)),
28)     popup_down: Some(( code: Char('n'), modifiers: ( bits: 2,),)),
29)     page_up: Some(( code: Char('b'), modifiers: ( bits: 2,),)),
30)     page_down: Some(( code: Char('f'), modifiers: ( bits: 2,),)),
31)     home: Some(( code: Char('g'), modifiers: ( bits: 0,),)),
32)     end: Some(( code: Char('G'), modifiers: ( bits: 1,),)),
33)     shift_up: Some(( code: Char('K'), modifiers: ( bits: 1,),)),
34)     shift_down: Some(( code: Char('J'), modifiers: ( bits: 1,),)),
dblume Add key bindings for gitui

dblume authored 1 year ago

35) 
dblume Improved vim key bindings f...

dblume authored 1 year ago

36)     edit_file: Some(( code: Char('I'), modifiers: ( bits: 1,),)),
37) 
38)     status_reset_item: Some(( code: Char('U'), modifiers: ( bits: 1,),)),
39) 
40)     diff_reset_lines: Some(( code: Char('u'), modifiers: ( bits: 0,),)),
41)     diff_stage_lines: Some(( code: Char('s'), modifiers: ( bits: 0,),)),
42) 
43)     stashing_save: Some(( code: Char('w'), modifiers: ( bits: 0,),)),
44)     stashing_toggle_index: Some(( code: Char('m'), modifiers: ( bits: 0,),)),
45) 
46)     stash_open: Some(( code: Char('l'), modifiers: ( bits: 0,),)),
47) 
48)     abort_merge: Some(( code: Char('M'), modifiers: ( bits: 1,),)),