Account for key releases in to_delayed_action
to_delayed_action currently accounts for subsequent key presses An array of to events that will be sent if no other key is pressed after the from key is pressed
I'd like to be able to track both key presses AND releases to allow the following scenario:
Let's say I have set up an ␠(space) key to set a mode_sp variable to 1 on hold to enter a new layer (and reset mode_sp to 0 on release).
Then, within this layer, I've set another layer m to set a mode_m variable to 1 on tap to enter a new layer (and reset mode_m to 0 only when ␠ is released)
Then, within these two layers, every single key produces some symbol
There are too many keys in this mode_sp+mode_m layers, so it's hard to remember all of them, thus I'd like to launch an applescript that shows notifications of what this layer contains, but only after some time has passed, so that:
- don't notify: if you press a key in this
mode_spwithin 1 second - notify: if you don't remember what to press and wait >1s
- don't notify: if you decide you don't need to insert a symbol and release ␠
The to_delayed_action.to_if_invoked for the m key works great for the first two options, but in the 3rd one it still shows the notification because this condition doesn't track key releases, only key presses.
Would it be possible to add an option to track both key presses and releases (excluding self, in this case m so that tapping m doesn't affect this condition)?
Source: pqrs-org/Karabiner-Elements