Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: clear non-oneshot output chord on next action #552

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

jtroo
Copy link
Owner

@jtroo jtroo commented Aug 30, 2023

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 do
something like (one-shot C-S-lalt) to get 3 modifiers within a
one-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

  • Add documentation to docs/config.adoc
    • Yes
  • Add example to cfg_samples/kanata.kbd
    • N/A
  • Update error messages
    • N/A
  • Added tests, or did manual testing
    • Yes

@jtroo jtroo linked an issue Aug 30, 2023 that may be closed by this pull request
@jtroo jtroo force-pushed the better-output-chord branch 3 times, most recently from fdedccf to bf51275 Compare August 30, 2023 06:10
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 do
something like `(one-shot C-S-lalt)` to get 3 modifiers within a
one-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.
@jtroo jtroo merged commit 4da1456 into main Aug 30, 2023
3 checks passed
@jtroo jtroo deleted the better-output-chord branch August 30, 2023 06:16
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.

Feature request: improved output chord handling
1 participant