From d766be700cee395198dbcbcf90f0103ca415b411 Mon Sep 17 00:00:00 2001 From: hhhh hgfh Date: Wed, 9 Sep 2026 19:25:37 +0300 Subject: [PATCH] feat: add gitui config --- gitui/key_bindings.ron | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 gitui/key_bindings.ron diff --git a/gitui/key_bindings.ron b/gitui/key_bindings.ron new file mode 100644 index 0000000..5f3b30c --- /dev/null +++ b/gitui/key_bindings.ron @@ -0,0 +1,40 @@ +// Note: +// If the default key layout is lower case, +// and you want to use `Shift + q` to trigger the exit event, +// the setting should like this `exit: Some(( code: Char('Q'), modifiers: "SHIFT")),` +// The Char should be upper case, and the modifier should be set to "SHIFT". +// +// Note: +// find `KeysList` type in src/keys/key_list.rs for all possible keys. +// every key not overwritten via the config file will use the default specified there +( + open_help: Some(( code: F(1), modifiers: "")), + + move_left: Some(( code: Char('h'), modifiers: "")), + move_right: Some(( code: Char('l'), modifiers: "")), + move_up: Some(( code: Char('k'), modifiers: "")), + move_down: Some(( code: Char('j'), modifiers: "")), + + popup_up: Some(( code: Char('p'), modifiers: "CONTROL")), + popup_down: Some(( code: Char('n'), modifiers: "CONTROL")), + page_up: Some(( code: Char('b'), modifiers: "CONTROL")), + page_down: Some(( code: Char('f'), modifiers: "CONTROL")), + home: Some(( code: Char('g'), modifiers: "")), + end: Some(( code: Char('G'), modifiers: "SHIFT")), + shift_up: Some(( code: Char('K'), modifiers: "SHIFT")), + shift_down: Some(( code: Char('J'), modifiers: "SHIFT")), + + edit_file: Some(( code: Char('I'), modifiers: "SHIFT")), + + status_reset_item: Some(( code: Char('U'), modifiers: "SHIFT")), + + diff_reset_lines: Some(( code: Char('u'), modifiers: "")), + diff_stage_lines: Some(( code: Char('s'), modifiers: "")), + + stashing_save: Some(( code: Char('w'), modifiers: "")), + stashing_toggle_index: Some(( code: Char('m'), modifiers: "")), + + stash_open: Some(( code: Char('l'), modifiers: "")), + + abort_merge: Some(( code: Char('M'), modifiers: "SHIFT")), +)