config: wip: add support for modifiers in mouse bindings

Mouse bindings can now include modifiers. They are specified in pretty
much the same way as in keyboard bindings:

  Control+BTN_LEFT
This commit is contained in:
Daniel Eklöf 2020-08-09 22:40:53 +02:00
parent 823a7c0318
commit 544c1b1976
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
6 changed files with 207 additions and 31 deletions

View file

@ -17,16 +17,21 @@ struct config_font {
struct config_key_binding_normal {
enum bind_action_normal action;
char *key;
char *combos;
struct {
char *cmd;
char **argv;
} pipe;
};
struct config_mouse_binding {
enum bind_action_normal action;
char *combos;
};
struct config_key_binding_search {
enum bind_action_search action;
char *key;
char *combos;
};
struct config {
@ -91,7 +96,7 @@ struct config {
struct {
/* Bindings for "normal" mode */
tll(struct config_key_binding_normal) key;
tll(struct mouse_binding) mouse;
tll(struct config_mouse_binding) mouse;
/*
* Special modes