-
-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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
Fix Command feature: use get_mods() instead of keyboard_report->mods #4955
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
…b_hid/test For some reason, this occurrence used KB_LSHIFT and KB_RSHIFT, which don't exist
6858b56
to
464d3bb
Compare
I think that eventually or soon, that we should implement a |
Thanks! |
Shinichi-Ohki
added a commit
to Shinichi-Ohki/qmk_firmware
that referenced
this pull request
Jan 27, 2019
* 'master' of https://github.com/qmk/qmk_firmware: Fix Command feature: use get_mods() instead of keyboard_report->mods (qmk#4955) [Keymap] Small improvements to Maxr1998's Contra keymap (qmk#4952) [Keymap] Minor updates to my dz60 keymap (qmk#4943) [Keyboard] UniGo66 keyboard added (qmk#4913) [Keymap] Move Iris via support to Via keymap (qmk#4893) Adds a default value for IS_COMMAND for COMMAND feature (qmk#4301) [Keyboard] drop unused i2c files (qmk#4948) [Keymap] Add Maxim keymap for Fourier (qmk#4534) use built-in arm stuff [Keymap] Add userspace files for vosechu (qmk#4912)
@drashna I totally agree! In fact, that's what I'm planning on doing next (right after replacing user-defined mod masks with the new standard ones). |
zer09
pushed a commit
to zer09/qmk_firmware
that referenced
this pull request
Feb 9, 2019
…mk#4955) * Remove unnecessary IS_COMMAND definition in clueboard/66/rev4 * Replace keyboard_report->mods with get_mods() in IS_COMMAND definitions * Update docs to use get_mods() instead of keyboard_report->mods * Replace keyboard_report->mods with get_mods() in tmk_core/protocol/usb_hid/test For some reason, this occurrence used KB_LSHIFT and KB_RSHIFT, which don't exist * Replace keyboard_report->mods with get_mods() in Massdrop keyboards (as per @patrickmt)
dlhextall
pushed a commit
to dlhextall/qmk_firmware
that referenced
this pull request
May 24, 2019
…mk#4955) * Remove unnecessary IS_COMMAND definition in clueboard/66/rev4 * Replace keyboard_report->mods with get_mods() in IS_COMMAND definitions * Update docs to use get_mods() instead of keyboard_report->mods * Replace keyboard_report->mods with get_mods() in tmk_core/protocol/usb_hid/test For some reason, this occurrence used KB_LSHIFT and KB_RSHIFT, which don't exist * Replace keyboard_report->mods with get_mods() in Massdrop keyboards (as per @patrickmt)
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
As discussed in #4838, the Command feature doesn't work when NKRO is turned on since the keyboard report structure is different.
get_mods()
is the proper way to retrieve mod state. See issue for further details.I've only replaced occurrences of
keyboard_report->mods
inIS_COMMAND
definitions and Massdrop keyboard code (as per @patrickmt's comment on the issue). It's likely that other occurrences in keyboard code and user keymaps can be replaced as well, but I didn't want to do that in this PR as it could require more extensive testing.Additionally, I removed an unnecessary
IS_COMMAND
redefinition inkeyboards/clueboard/66/rev4/config.h
which we missed in #4301.Thanks @fauxpark for helping me figure out what was causing the problems with Command!
Based on #4301. Closes #4838.
Types of changes
Issues Fixed or Closed by this PR
Checklist: