-
-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
Make IGNORE_MOD_TAP_INTERRUPT the default behaviour for mod-taps #20211
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drashna
approved these changes
Mar 21, 2023
github-actions
bot
added
keyboard
keymap
via
Adds via keymap and/or updates keyboard for via support
labels
Mar 21, 2023
The keyboard lint check fails because some of the keyboards are missing license headers in some of their files but this is irrelevant to this PR. As for the QMK CI build, it gets discouraged when it sees the >100 keyboards it would need to compile and gives up. |
The quick_tap tests for simple interactions between mod-tap keys assumed the old HOLD_ON_OTHER_KEY_PRESS-like behaviour of mod-tap keys but updating the tests to adapt to the new IGNORE_MOD_TAP_INTERRUPT-like behaviour of modtaps would make them redundant with the same tests already present in default_mod_tap, so they were simply removed instead.
tzarc
approved these changes
Apr 3, 2023
@precondition this PR completely flew under my radar, great that this is now the default behavior. 🎉 |
14 tasks
2 tasks
coquizen
pushed a commit
to coquizen/qmk_firmware
that referenced
this pull request
Jun 22, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
core
documentation
keyboard
keymap
translation
via
Adds via keymap and/or updates keyboard for via support
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.
Description
This is part 2 of the project of removing
IGNORE_MOD_TAP_INTERRUPT*
to make it the default behaviour of mod-tap keys in order to align them with the rest of tap-hold keys and ease configuration that was started with PR #15741.Details/Motivation (copied from part 1)
TL;DR This PR removes `IGNORE_MOD_TAP_INTERRUPT` and makes it the default behaviour for mod-taps.If we compare mod-tap behaviour with layer-tap behaviour, we get this:
HOLD_ON_OTHER_KEY_PRESS
for layer-tapsIGNORE_MOD_TAP_INTERRUPT
for mod-taps = default layer-tap behaviour(Where "default" refers to no particular tap hold settings enabled for this type of dual-role key and "old" refers to any QMK version without this PR)
To make this easier, let's call the current/old default MT behaviour as
HOLD_ON_INTERRUPT
since it chooses the hold action as soon as an interrupting key is pressed. @sigprof 'sHOLD_ON_OTHER_KEY_PRESS
works exactly the same way asHOLD_ON_INTERRUPT
except thatHOLD_ON_OTHER_KEY_PRESS
has shorter key delays, i.e. it takes the tap-or-hold decision slightly faster and sends the keyboard report to the host earlier.Ideally, the default behaviour for layer-taps should be consistent with that of mod-taps. The best candidate for "default" behaviour is an option that takes the longest to make the tap-or-hold decision.
It is a bad idea to keep a
HOLD_ON_INTERRUPT
-like behaviour as default for modtaps (like it currently is) because this is the option that takes the shortest to make the tap-or-hold decision. This means that enabling additional options likePERMISSIVE_HOLD
is unnoticeable becauseHOLD_ON_INTERRUPT
short-circuits the decision. Users have to explicitly disable this hold-on-interrupt by definingIGNORE_MOD_TAP_INTERRUPT
in order for extra tap-hold settings to actually take effect.Consider the following chain of event, highlighting how
HOLD_ON_INTERRUPT
/HOLD_ON_OTHER_KEY_PRESS
short-circuits the tap-or-hold decision (mt is released before the tapping term expired):Furthermore, the doc page on tap hold settings clearly states that "IGNORE_INTERRUPT" is the default behaviour for dual-role keys:
This PR brings the code in alignment to what the documentation says.
These changes also simplified a great deal the tap hold documentation page that most people find very hard to understand.
Finally, despite the diff looking mostly red, no loss of functionality occurs.
Types of Changes
Issues Fixed or Closed by This PR
Checklist
default_mod_tap
. The associatedconfig.h
file included#define IGNORE_MOD_TAP_INTERRUPT
and now I can simply remove that line and still make use of those same tests I had written)