-
-
Notifications
You must be signed in to change notification settings - Fork 40.2k
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
Extend allowed range of tappable keycodes to include modifiers #5809
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Are any documentation changes warranted? this seems like a great feature. |
Not really, though perhaps it should be noted that it can't be extended further to include mousekeys too, as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
At the moment, this PR doesn't fix use cases like MT(MOD_RCTL, KC_DOLLAR). This will still send 4 on tap instead of $. Is there any hope of this being addressed here? |
@rgreenblatt no. No chance at all. The problem is that there isn't enough space to be able to add the shifted notation to this. We would have to extend the keycodes. Basic keycodes can and do use the 8 bit range, while extra stuff uses higher. Here, for instance, the keycode is broken up a la:
The Shifted keycodes use the first 8 bits to mark what mod it's using, and the second 8 for the keycode. eg
Where Some of this info is from memory, so it may not be 100% accurate. But this should give you a good idea of why it's not possible. We'd have to expand to 24 (or realistically) 32 bit keycodes. Which would double the size of the keymaps in the firmware (not insignificant) and would require a MASSIVE rewrite of the code. |
Bump :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Turns out this doesn't actually fix the issue for |
Here's my solution to the Tested with:
The left/right bit is stripped from the RGUI in the LM define, turning it into an LGUI, but this is okay as it always did that anyway. |
Not sure if this should be a breaking change or not. |
I don't believe it is - it doesn't even change keycode values, so VIA is safe 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, not a breaking change.
Description
This should allow you to do things like
LCTL_T(KC_LGUI)
for a Control/GUI Mod-Tap.Types of Changes
Issues Fixed or Closed by This PR
Checklist