Key Overrides: Fix Ghost Modifier Bug on macOS (with Karabiner Elements)#25886
Open
mellanslag-de wants to merge 1 commit intoqmk:masterfrom
Open
Key Overrides: Fix Ghost Modifier Bug on macOS (with Karabiner Elements)#25886mellanslag-de wants to merge 1 commit intoqmk:masterfrom
mellanslag-de wants to merge 1 commit intoqmk:masterfrom
Conversation
…s to fix bug with macOS+Karabiner Elements
|
Thank you for your contribution! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Key Overrides seem to have a bug where sometimes Modifiers are pressed when not wanted, or not pressed when wanted.
This issue seems to already be known about and was partly fixed, judging by this line of code (also in the diff of this pr):
But apparently, this wait does not fix the bug fully, judging by this issue #24688 and also by the bug I observed (describe in my comment to that issue #24688 (comment)), which is basically shift being held down, even though it should be suppressed.
To summarize it seems to happen rarely on macOS (judging by the quoted code comment above), and always for me and the issue creator when Karabiner Elements is used.
And QMK currently seems to handle/fix that edge case only for non-basic keycodes, not for basic ones.
And thats exactly what this PR addresses. I added the "send keyboard report with modifiers, then wait, only then send the key press" also in the case of basic key codes. I decided to then move it out of the if statement to reduce code duplication, with the downside of the printf now happening slightly later. I hope that's okay, else I can of course also move it back into the if statement by duplicating it to both branches.
But im not really into the inner workings of QMK, so I cant really judge whether its a good or appropriate fix, all i can say that this change makes it work for me :)
Types of Changes
Issues Fixed or Closed by This PR
Checklist