aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-03-08 14:17:29 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-03-08 14:17:57 +0000
commitfcf483277568a7839708428cd30f53b01465cc04 (patch)
tree34da5e2d01c01bc8b862c25b0111473249a5d684 /config.c
parentwip: initial framework for dealing with key/mouse bindings in different modes (diff)
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.
Diffstat (limited to 'config.c')
-rw-r--r--config.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/config.c b/config.c
index 0baa5eb5..124c76b6 100644
--- a/config.c
+++ b/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"),