From fcf483277568a7839708428cd30f53b01465cc04 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sun, 8 Mar 2020 15:17:29 +0100 Subject: 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. --- config.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'config.c') 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"), -- cgit v1.3