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

@ -53,9 +53,11 @@ struct key_binding_normal {
struct mouse_binding {
enum bind_action_normal action;
xkb_mod_mask_t mods;
uint32_t button;
int count;
};
typedef tll(struct mouse_binding) mouse_binding_list_t;
enum bind_action_search {
BIND_ACTION_SEARCH_NONE,
@ -173,6 +175,8 @@ struct seat {
/* We used a discrete axis event in the current pointer frame */
double axis_aggregated;
bool have_discrete;
mouse_binding_list_t bindings;
} mouse;
/* Clipboard */