From c95cea96af7189a1fdb6bf8ca5f61fa545d603b1 Mon Sep 17 00:00:00 2001 From: extrawurst Date: Sun, 9 Mar 2025 12:17:58 +0100 Subject: [PATCH] more docs on keycodes --- KEY_CONFIG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/KEY_CONFIG.md b/KEY_CONFIG.md index 111b862f19..07c0e69993 100644 --- a/KEY_CONFIG.md +++ b/KEY_CONFIG.md @@ -26,7 +26,11 @@ The location of the file depends on your OS: * `$HOME/.config/gitui/key_bindings.ron` (linux) * `%APPDATA%/gitui/key_bindings.ron` (Windows) -See all possible keys to overwrite in code: [here](https://github.com/extrawurst/gitui/blob/master/src/keys/key_list.rs#L83) +See all possible keys to overwrite in gitui: [here](https://github.com/extrawurst/gitui/blob/master/src/keys/key_list.rs#L83) + +Possible values for: +* `code` are defined by the type `KeyCode` in crossterm: [here](https://docs.rs/crossterm/latest/crossterm/event/enum.KeyCode.html) +* `modifiers` are defined by the type `KeyModifiers` in crossterm: [here](hhttps://docs.rs/crossterm/latest/crossterm/event/struct.KeyModifiers.html) Here is a [vim style key config](vim_style_key_config.ron) with `h`, `j`, `k`, `l` to navigate. Use it to copy the content into `key_bindings.ron` to get vim style key bindings.