bindsym/code: add group support

This adds support for specifying a binding for a specific group. Any
binding without a group listed will be available in all groups. The
priority for matching bindings is as follows: input device, group, and
locked state.

For full compatibility with i3, this also adds Mode_switch as an alias
for Group2. Since i3 only supports this for backwards compatibility
with older versions of i3, it is implemented here, but not documented.
This commit is contained in:
Brian Ashworth 2019-07-26 12:02:18 -04:00 committed by Simon Ser
parent 14562fdbee
commit 8ee054b1b9
4 changed files with 76 additions and 15 deletions

View file

@ -53,6 +53,7 @@ struct sway_binding {
list_t *keys; // sorted in ascending order
list_t *syms; // sorted in ascending order; NULL if BINDING_CODE is not set
uint32_t modifiers;
xkb_layout_index_t group;
char *command;
};