Fix OSM modifiers only send keydown when held after tap #24925
+2
−1
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
(seems related to #3963)
Currently, one shot modifiers have weird behavior on windows (and maybe others). After a OSM(MOD_XXX) key is tapped and then held and released, there is a key down even registered for that key but no key up. Additionally, according to QMK the mod is not considered active. So for the host, the modifier is active but for QMK it's not. This seems like a bug.
This PR fixes the problem by only sending one shot modifiers to the host if there is in fact a relevant key pressed, i.e. no one shots. This allows the user to deactivate one shots by holding and releasing past COMBO_TERM.
Replicate:
OSM(MOD_GUI)
key (or another OSM modifier)Example debug output with bug
Example debug output with this new PR
Types of Changes
Issues Fixed or Closed by This PR
Checklist