solorice/.config/gitui/key_bindings.ron

96 lines
5.5 KiB
Plaintext

// bit for modifiers
// bits: 0 None
// bits: 1 SHIFT
// bits: 2 CONTROL
//
// 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: ( bits: 1,),)),`
// The Char should be upper case, and the shift modified bit should be set to 1.
(
tab_status: Some((code: Char('1'), modifiers: (bits: 0))),
tab_log: Some((code: Char('2'), modifiers: (bits: 0))),
tab_files: Some((code: Char('3'), modifiers: (bits: 0))),
tab_stashing: Some((code: Char('4'), modifiers: (bits: 0))),
tab_stashes: Some((code: Char('5'), modifiers: (bits: 0))),
tab_toggle: Some((code: Char('L'), modifiers: (bits: 1))),
tab_toggle_reverse: Some((code: Char('H'), modifiers: (bits: 1))),
toggle_workarea: Some((code: Char('w'), modifiers: (bits: 0))),
exit: None,
quit: None,
exit_popup: Some((code: Char('q'), modifiers: (bits: 0))),
open_commit: Some((code: Char('c'), modifiers: (bits: 0))),
open_commit_editor: Some((code: Char('e'), modifiers: (bits: 2))),
open_help: Some((code: F(1), modifiers: (bits: 0))),
open_options: Some((code: Char('o'), modifiers: (bits: 0))),
move_left: Some((code: Char('h'), modifiers: (bits: 0))),
move_right: Some((code: Char('l'), modifiers: (bits: 0))),
tree_collapse_recursive: Some((code: Left, modifiers: (bits: 1))),
tree_expand_recursive: Some((code: Right, modifiers: (bits: 1))),
home: Some((code: Char('g'), modifiers: (bits: 0))),
end: Some((code: Char('G'), modifiers: (bits: 0))),
move_up: Some((code: Char('k'), modifiers: (bits: 0))),
move_down: Some((code: Char('j'), modifiers: (bits: 0))),
popup_up: Some((code: Char('p'), modifiers: (bits: 2))),
popup_down: Some((code: Char('n'), modifiers: (bits: 2))),
page_up: Some((code: Char('u'), modifiers: (bits: 2))),
page_down: Some((code: Char('d'), modifiers: (bits: 2))),
shift_up: Some((code: Up, modifiers: (bits: 1))),
shift_down: Some((code: Down, modifiers: (bits: 1))),
enter: Some((code: Enter, modifiers: (bits: 0))),
blame: Some((code: Char('b'), modifiers: (bits: 0))),
file_history: Some((code: Char('h'), modifiers: (bits: 2))),
edit_file: Some((code: Char('e'), modifiers: (bits: 0))),
status_stage_all: Some((code: Char('a'), modifiers: (bits: 0))),
status_reset_item: Some((code: Char('U'), modifiers: (bits: 1))),
diff_reset_lines: Some((code: Char('u'), modifiers: (bits: 0))),
status_ignore_file: Some((code: Char('i'), modifiers: (bits: 0))),
diff_stage_lines: Some((code: Char('s'), modifiers: (bits: 0))),
stashing_save: Some((code: Char('w'), modifiers: (bits: 0))),
stashing_toggle_untracked: Some((code: Char('u'), modifiers: (bits: 0))),
stashing_toggle_index: Some((code: Char('m'), modifiers: (bits: 0))),
stash_apply: Some((code: Char('a'), modifiers: (bits: 0))),
stash_open: Some((code: Char('l'), modifiers: (bits: 0))),
stash_drop: Some((code: Char('D'), modifiers: (bits: 1))),
cmd_bar_toggle: Some((code: Char('.'), modifiers: (bits: 0))),
log_tag_commit: Some((code: Char('t'), modifiers: (bits: 0))),
log_mark_commit: Some((code: Char(' '), modifiers: (bits: 0))),
log_checkout_commit: Some((code: Char('S'), modifiers: (bits: 1))),
log_reset_comit: Some((code: Char('R'), modifiers: (bits: 1))),
log_reword_comit: Some((code: Char('r'), modifiers: (bits: 0))),
log_find: Some((code: Char('/'), modifiers: (bits: 0))),
find_commit_sha: Some((code: Char('/'), modifiers: (bits: 0))),
commit_amend: Some((code: Char('a'), modifiers: (bits: 2))),
toggle_signoff: Some((code: Char('s'), modifiers: (bits: 2))),
toggle_verify: Some((code: Char('v'), modifiers: (bits: 2))),
copy: Some((code: Char('y'), modifiers: (bits: 0))),
create_branch: Some((code: Char('c'), modifiers: (bits: 0))),
rename_branch: Some((code: Char('r'), modifiers: (bits: 0))),
select_branch: Some((code: Char('b'), modifiers: (bits: 0))),
delete_branch: Some((code: Char('D'), modifiers: (bits: 1))),
merge_branch: Some((code: Char('m'), modifiers: (bits: 0))),
rebase_branch: Some((code: Char('R'), modifiers: (bits: 1))),
compare_commits: Some((code: Char('C'), modifiers: (bits: 1))),
tags: Some((code: Char('T'), modifiers: (bits: 1))),
delete_tag: Some((code: Char('D'), modifiers: (bits: 1))),
select_tag: Some((code: Char(' '), modifiers: (bits: 0))),
push: Some((code: Char('P'), modifiers: (bits: 1))),
force_push: None,
undo_commit: Some((code: Char('U'), modifiers: (bits: 1))),
fetch: Some((code: Char('F'), modifiers: (bits: 1))),
pull: Some((code: Char('p'), modifiers: (bits: 0))),
abort_merge: Some((code: Char('A'), modifiers: (bits: 1))),
open_file_tree: Some((code: Char('F'), modifiers: (bits: 1))),
file_find: Some((code: Char('/'), modifiers: (bits: 0))),
branch_find: Some((code: Char('/'), modifiers: (bits: 0))),
diff_hunk_next: Some((code: Char('n'), modifiers: (bits: 0))),
diff_hunk_prev: Some((code: Char('p'), modifiers: (bits: 0))),
stage_unstage_item: Some((code: Char(' '), modifiers: (bits: 0))),
tag_annotate: Some((code: Char('a'), modifiers: (bits: 2))),
view_submodules: Some((code: Char('S'), modifiers: (bits: 1))),
view_submodule_parent: Some((code: Char('p'), modifiers: (bits: 0))),
update_submodule: Some((code: Char('u'), modifiers: (bits: 0))),
commit_history_next: Some((code: Char('n'), modifiers: (bits: 2))),
)