mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-22 05:33:45 -04:00
input: convert the rest of the normal key bindings to configurable bindings
New actions defined and implemented: * scrollback up/down * font size up/down/reset * spawn terminal Break out key combo parsing to a new function, parse_key_binding_for_action(). This function parses a string containing one or more space separated key combo definitions on the form (mod1+mod2+...+key), where key is a XKB key name (e.g. KP_Add). Convert all hardcoded key bindings to configuration based bindings. These still cannot actually be configured by the user, but at least lives in the conf struct.
This commit is contained in:
parent
b22bb30976
commit
fcf4832775
4 changed files with 107 additions and 83 deletions
6
config.c
6
config.c
|
|
@ -621,9 +621,15 @@ config_load(struct config *conf, const char *conf_path)
|
|||
|
||||
.bindings = {
|
||||
.key = {
|
||||
[BIND_ACTION_SCROLLBACK_UP] = strdup("Shift+Page_Up"),
|
||||
[BIND_ACTION_SCROLLBACK_DOWN] = strdup("Shift+Page_Down"),
|
||||
[BIND_ACTION_CLIPBOARD_COPY] = strdup("Control+Shift+C"),
|
||||
[BIND_ACTION_CLIPBOARD_PASTE] = strdup("Control+Shift+V"),
|
||||
[BIND_ACTION_SEARCH_START] = strdup("Control+Shift+R"),
|
||||
[BIND_ACTION_FONT_SIZE_UP] = strdup("Control+plus Control+equal Control+KP_Add"),
|
||||
[BIND_ACTION_FONT_SIZE_DOWN] = strdup("Control+minus Control+KP_Subtract"),
|
||||
[BIND_ACTION_FONT_SIZE_RESET] = strdup("Control+0 Control+KP_0"),
|
||||
[BIND_ACTION_SPAWN_TERMINAL] = strdup("Control+Shift+Return"),
|
||||
},
|
||||
.mouse = {
|
||||
[BIND_ACTION_PRIMARY_PASTE] = strdup("BTN_MIDDLE"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue