zmk
zmk copied to clipboard
feat: Added a flag to key press behavior to allow it to be inverted
Currently if two of the same binding are pressed and then released, the first release will be treated as both keys being released.
This adds a new optional flag to the key press behavior invert-if-active causing the behavior to invert its function if the binding is already pressed:
- If pressed and inverting key press is pressed, a release is triggered
- If released and inverting key press is released, a press is triggered
This flag resolves this inconsistent behavior, but is marked as optional for backwards compatibility and as it is less intuitive.
It is also a quite useful interaction, in my opinion:
- Quickly interrupting shift or a similar modifier
- Toggle W on and press W to stay in place for reduced key holding when WASD gaming