aboutsummaryrefslogtreecommitdiff
path: root/config.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2022-02-06 18:36:44 +0000
committerDaniel Eklöf <daniel@ekloef.se>2022-02-16 22:02:07 +0000
commit422d94fb46ad18e52f5385e416cd00cb7b4c2fc9 (patch)
tree307b544335964de5ccc0c99843ae97f1218499b5 /config.h
parentmain: --server: don’t exit with code 0 on failure (diff)
wip: map key combos to custom text strings (including escapes)
With this, it is now possible to map key combos to custom escapes. The new bindings are defined in a new section, “text-bindings”, on the form “string=key combo”. The string can consist of printable characters, or \xNN style hex digits: [text-bindings] abcd = Control+a \x1b[A = Control+b Control+c Control+d # map ctrl+b/c/d to UP
Diffstat (limited to 'config.h')
-rw-r--r--config.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/config.h b/config.h
index cd5bbd14..cf9ca3db 100644
--- a/config.h
+++ b/config.h
@@ -47,6 +47,7 @@ struct argv {
enum binding_aux_type {
BINDING_AUX_NONE,
BINDING_AUX_PIPE,
+ BINDING_AUX_TEXT,
};
struct binding_aux {
@@ -55,6 +56,11 @@ struct binding_aux {
union {
struct argv pipe;
+
+ struct {
+ uint8_t *data;
+ size_t len;
+ } text;
};
};
@@ -63,6 +69,11 @@ enum key_binding_type {
MOUSE_BINDING,
};
+struct config_key_binding_text {
+ char *text;
+ bool master_copy;
+};
+
struct config_key_binding {
int action; /* One of the varios bind_action_* enums from wayland.h */
struct config_key_modifiers modifiers;