feat!: clear non-oneshot output chord on next action #552
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 commit changes output chord behavior to be more user-friendly by
clearing output chord keys on the next action. I have also been told
(though have not confirmed) that QMK has similar behaviour. I am not
sure that the change in this commit replicates QMK's behaviour
perfectly, but it seems good enough.
Clearing output chord keys on the next action allows a subsequent typed
key to not have modifiers pressed alongside it. Without this change,
typing a new key without first releasing an output chord can have the
unintended typing result. Users have asked about this few times in
issues/discussions and the current workaround is to use a macro.
However, this can be hard to discover. Some users may just be living
with the annoyance because aren't aware that there is a workaround and
they haven't asked.
Output chords within a
one-shot
are ignored because someone might dosomething like
(one-shot C-S-lalt)
to get 3 modifiers within aone-shot action. These are probably intended to remain held. However,
other output chords are usually used to type symbols or accented
characters, e.g. S-1 or RA-a. If the symbol or accented character is
held down, key repeat works just fine because OS key repeats are not
keyberon actions.
Checklist