add --allow-other flag for keybindings

This flag allows other keys to be pressed at the same time as the
binding. This acts as follows:
- All key modifiers not explicitly listed in the binding are ignored.
  The binding's modifiers are still required to be pressed.
- If other keys are pressed between press and release, release is still
  triggered.
This commit is contained in:
chayleaf 2023-05-23 07:55:25 +07:00
parent 48d6eda3cb
commit e3e5604ccf
4 changed files with 48 additions and 4 deletions

View file

@ -50,6 +50,7 @@ enum binding_flags {
BINDING_INHIBITED = 1 << 7, // keyboard only: ignore shortcut inhibitor
BINDING_NOREPEAT = 1 << 8, // keyboard only; do not trigger when repeating a held key
BINDING_EXACT = 1 << 9, // gesture only; only trigger on exact match
BINDING_ALLOWOTHER = 1 << 10, // keyboard only; allow other keys to be pressed at the same time
};
/**