Escape-Oneshot: toggle OneShot_ActiveStickyKey by pressing it again with no keys held #1496
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR improves usability of the OneShotMetaKeys plugin, in particular
OneShot_ActiveStickyKey, when used with theEscapeOneShotplugin. SinceOneShot_ActiveStickyKeycan 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_ActiveStickyKeyagain with no keys held to cancel all sticky keys.Key_OneShotCancelandEscapekeys can also accomplish this, but with this PR, you don't need to dedicate an extra key or alter the behavior of theEscapekey (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_ActiveStickyKeybehavior is frustratingly unintuitive—so I propose this PR be the default behavior withEscapeOneShot. Alternatives: (1) configure withEscapeOneShot.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).