diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2023-05-06 09:39:38 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-02-06 10:05:20 +0000 |
| commit | 4730ff8d080e82fad0554dfcb957dfc82f6568b3 (patch) | |
| tree | a5958828b1ee63c30f459c68f5ce72236e162607 /input.h | |
| parent | feature: add resize-by-cells option to constrain window sizes... (diff) | |
input/config: support *all* modifier names
That is, allow custom modifiers (i.e. other than ctrl/shift/alt etc)
in key bindings.
This is done by no longer validating/translating modifier names to
booleans for a pre-configured set of modifiers (ctrl, shift, alt,
super).
Instead, we keep the modifier *names* in a list, in the key binding
struct.
When a keymap is loaded, and we "convert" the key binding, _then_ we
do modifier translation. For invalid modifier names, we print an
error, and then ignore it. I.e. we no longer fail to load a config due
to invalid modifier names.
We also need to update how we determine the set of significant
modifiers. Any modifier not in this list will be ignored when matching
key bindings.
Before this patch, we hardcoded this to shift/alt/ctrl/super. Now, to
handle custom modifiers as well, we simply treat *all* modifiers
defined by the current layout as significant.
Typically, the only unwanted modifiers are "locked" modifiers. We are
already filtering these out.
Diffstat (limited to 'input.h')
0 files changed, 0 insertions, 0 deletions
