-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat: lock a momentary layer #1984
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This PR is now feature complete, so I've marked it as ready for review. It would be nice to allow custom momentary layer lock behaviors to accept an arbitrary arguments, but I didn't see any prior art for that and I'm still not too proficient with devicetree/Zephyr, so for now you need to specify all the arguments when the behavior is defined. |
This comment was marked as resolved.
This comment was marked as resolved.
6815583
to
0416118
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.
LGTM from docs POV.
I wasn't sure if a QMK-like dual mode approach where we have "default" layers and regular layers was needed (where such a behavior could convert a layer from normal to default), but this seems to cover the use cases well enough with a simple design.
a1f8232
to
8df10a7
Compare
8df10a7
to
263087f
Compare
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
e8ce540
to
f3162a0
Compare
f3162a0
to
df49639
Compare
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
Thanks @caksoylar. The rebased version seems to be working fine (I've been running it since last night). I've been using this for a few months now and still find it useful as part of my keymap, mostly for locking the navigation layer. I noticed the old documentation was a bit spartan so I added the example. It would be nice to get it upstreamed, but seeing as I'm the only user that seems a bit premature. Maybe I'll ask around on the Discord to see if anyone else wants to try it out... |
Any progress on this? :) |
I've been using this feature for some time now, and I think this design is simple, and achieves everything one might need to keep a momentary layer toggled. BTW, this works with |
Great change. I've also been using this for some time and it really works well. |
Resolves #1299.
Resolves #1771.
This adds a momentary layer lock behavior (
&molock
) which causes all active momentary layers not to become deactivated on release. If no layers are active,&molock
triggers a customizable fallback behavior, which defaults to&to 0
.See the newly added docs for a more complete description.