-
-
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
Command feature not working since single HID endpoint was introduced #4838
Comments
@abrasive Do you have any idea as to which part of your PR might have caused this? |
Weird... I have no issues with it here. I've got a Satan with basically default rules.mk except for: #CONSOLE_ENABLE = no
#COMMAND_ENABLE = no
RGBLIGHT_ENABLE = no
KEYBOARD_SHARED_EP = yes I get this in the toolbox:
Might be at the keyboard level? |
Here's how it behaves for me on Whitefox: https://i.imgur.com/VYkbX8e.gif |
I just tried it with |
What's with the tab? Also, what happens when you hit C? (I believe that actually enables the console printing) |
It prints fine without C when it's working (see here). |
Oh dear. I have returned from my research, and it looks like there is another report ID-related misalignment, this time in Before the shared endpoint stuff neither of them had report IDs, so using Introducing the new and improved default #define IS_COMMAND() ( \
(!keymap_config.nkro && (keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)))) || \
( keymap_config.nkro && (keyboard_report->nkro.mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)))) \
) I feel like at this point it might as well be turned into a weak function. |
Can't we just use #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))) instead, so we don't have to depend on the report formats? I'm not sure why By the way, props for getting down and dirty with this and figuring out what was causing it. I appreciate it. Edit: Tested the above and it works fine in all cases (shared EP on/off, NKRO on/off), as expected. However, it likely wouldn't work if I tried to use one shot mods to trigger commands. |
Oh, that's much nicer, I didn't even realise that was a thing. As for the oneshot/weak mods, you could just |
Indeed. I suspect that might have been the reason why |
I think checking just the real mods with
But they should still be able to do it by holding LShift+RShift and pressing the command key as you normally would. In other words,
should work even if LShift and RShift are set up as one shot mods. I'll need to test this to confirm. |
Well I guess once #4301 is merged we can go about changing the remaining |
My thoughts exactly 😃 |
Just tested it, it works fine with one shot mods. It registers the command if you hold both OSM mods (or even just one of them) down when you press the key. So it looks like |
Just found
And here's how those macros are used:
I wonder if this means that these keycodes don't work properly on Massdrop boards when NKRO is enabled. @patrickmt You might want to take a look. |
Since the arm_atsam code runs mostly its own USB implementation, I do see misalignment issues when
in tmk_core/common/report.h around line 79, before I've also confirmed changing |
I can add the |
It should be easy to do once your PR is merged in, so I'd keep them separate for now. For the sake of not expanding the scope of your PR further, as well as to keep the goals distinct (optimization vs bugfix). |
Sounds good. |
PR opened here: #4955 |
Describe the bug
The Command feature is not working. It appears that the single endpoint PR (#3951) broke it. I was able to reproduce the bug on AVR and ChibiOS (Kiibohd) boards.
When holding down the Command combination (default: LShift+RShift) and pressing one of the magic keys (e.g. D for debug mode), the key gets passed straight to the host without triggering the command. On versions prior to the aforementioned HID endpoint change, the keyboard would activate debug mode correctly and would never send the D key to the host machine.
Update: It works only with
KEYBOARD_SHARED_EP = yes
. See here for how it behaves.System Information
qmkfm/qmk_firmware
uses (presumably latest)qmkfm/qmk_firmware
uses (presumably latest)The text was updated successfully, but these errors were encountered: