zmk icon indicating copy to clipboard operation
zmk copied to clipboard

feat: Added a flag to key press behavior to allow it to be inverted

Open nmunnich opened this issue 1 year ago • 0 comments

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

nmunnich avatar Oct 15 '24 11:10 nmunnich