diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-03-08 14:17:29 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-03-08 14:17:57 +0000 |
| commit | fcf483277568a7839708428cd30f53b01465cc04 (patch) | |
| tree | 34da5e2d01c01bc8b862c25b0111473249a5d684 /wayland.h | |
| parent | wip: 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 'wayland.h')
| -rw-r--r-- | wayland.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -42,10 +42,16 @@ struct monitor { }; enum binding_action { + BIND_ACTION_SCROLLBACK_UP, + BIND_ACTION_SCROLLBACK_DOWN, BIND_ACTION_CLIPBOARD_COPY, BIND_ACTION_CLIPBOARD_PASTE, BIND_ACTION_PRIMARY_PASTE, BIND_ACTION_SEARCH_START, + BIND_ACTION_FONT_SIZE_UP, + BIND_ACTION_FONT_SIZE_DOWN, + BIND_ACTION_FONT_SIZE_RESET, + BIND_ACTION_SPAWN_TERMINAL, BIND_ACTION_COUNT, }; @@ -54,6 +60,7 @@ struct key_binding { xkb_keysym_t sym; enum binding_action action; }; +typedef tll(struct key_binding) key_binding_list_t; struct kbd { struct xkb_context *xkb; @@ -81,7 +88,9 @@ struct kbd { bool ctrl; bool meta; - tll(struct key_binding) key_bindings; + struct { + key_binding_list_t key; + } bindings; }; struct wl_clipboard { |
