Skip to content

Conversation

@davispw
Copy link
Contributor

@davispw davispw commented Apr 11, 2025

This PR improves usability of the OneShotMetaKeys plugin, in particular OneShot_ActiveStickyKey, when used with the EscapeOneShot plugin. Since OneShot_ActiveStickyKey can make any other key sticky, there's a high risk of getting stuck keys. One must remember each stickified key and toggle each one off—hard to do if you strike a key accidentally, or worse, if you make a layer shift sticky and the stuck key is on another layer!

With this improvement, one can simply tap OneShot_ActiveStickyKey again with no keys held to cancel all sticky keys.

Key_OneShotCancel and Escape keys can also accomplish this, but with this PR, you don't need to dedicate an extra key or alter the behavior of the Escape key (which, if so configured, needs two presses to send a normal Escape when OneShot is active and can't be combined with OneShot mods).

I considered making this configurable, but I feel that the current OneShot_ActiveStickyKey behavior is frustratingly unintuitive—so I propose this PR be the default behavior with EscapeOneShot. Alternatives: (1) configure with EscapeOneShot.setCancelKey(OneShot_ActiveMetaKey) or a new option (bonus: enhance Chyrsalis to set this via EscapeOneShotConfig so that at least the effect is achievable with default firmware); (2) make this a new plugin (which would also save a little memory for the bitfield for users who don't want it).

by pressing it again with no keys held.

Signed-off-by: Peter Davis <[email protected]>
@davispw davispw force-pushed the escape-activestickykey branch from b589cc3 to dad94c8 Compare April 11, 2025 17:34
@gedankenexperimenter
Copy link
Collaborator

Sounds reasonable to me. There is one thing I think you've misunderstood that I think is worth pointing out, though by no means invalidates your reasoning—any key that is active ("pressed" or "held") by OneShot retains its value despite layer shifts that take effect after the key was initially activated, just like a key that's held physically. This does mean that while it may be cognitively challenging to determine which key to press to cancel a key made sticky, activating a layer shift while a key is sticky doesn't mask that key from being released by tapping on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants