-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Cap LM to 8 layers max in order to support right modifiers #13085
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.
I like the idea of this, but this ... rubs me the wrong way.
I understand where you're coming from, it does strike as a little odd to put a cap on max layers in order to "unlock" right hand modifiers in a quantum keycode. Alternatively, we could consider making the 3 bits for layer and 5 bits for mods the new default for I guess that would technically qualify as a breaking change in that case but I really believe that supporting right hand mods (especially for AltGr) is worth more than supporting up to layer 15. |
Thank you for your contribution! |
@drashna I've reworked the PR to cap LM to 8 layers now as I have suggested, does this look better now? Now it means that the |
f08375b
to
a88dc72
Compare
a88dc72
to
f6c4f12
Compare
f6c4f12
to
c771503
Compare
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.
Honestly, my biggest problem here is that it supports only 8 layers, and is a decrease from 16. Ideally, we should be targeting 16 layers, since that's what most of the other stuff like this targets. By limiting it to 8, it's creating an inconsistency of the limitations within the layer keycodes.
And this is made worse by the fact that 16 layers is the default max, right now.
From a technical perspective, it looks good. From a UX standpoint, I don't like it.
This change will also break compatibility with VIA (like #17989 did for |
Some of this is should be covered by the DD keycode migration. A slightly different implementation as we extended the range to align the mod usage with existing keycodes, while keeping the 16 layer cap. Please let us know if we have missed anything in the process. |
Description
The current
LM(layer, mod)
is limited by memory constraints to max 16 layers (because the top 4 bits are used to store the layer) and only left modifiers (the remaining 4 bits are used for the GASC mod bits). Most people don't have more than 8 layers and would rather prefer to have the possibility to use right-hand modifiers inLM
.The amount of bits used to store the layer information is cut down to 3 bits and the freed bit is used as a LR flag for the modifiers (0 for left, 1 for right).
Akin to modtaps, only
MOD_RSFT
etc. are supported, notMOD_BIT(KC_RSFT)
etc.It's not possible to combine left and right modifiers in a single
LM
. If there is any right-handed modifier in the list, all the listed mods turn right-handed.Types of Changes
Issues Fixed or Closed by This PR
Checklist