-
-
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
Feature Request: Layer Lock Key #1771
Comments
Note: since QMK code is GPL, it should not be used as a reference when developing ZMK features. It is important that we honor the terms of the GPL license chosen by QMK. |
@petejohanson The code I linked is user code rather than QMK core code and uses a different license (Apache 2.0). Should I still remove the code link and just have the blogpost link that explains how it works at a high level? |
Ideally, yes, using the description of the behavior is best. |
I posted an example of how to achieve this on #1299 here: #1299 (comment) |
Thanks for the suggestion @bmijanovich. Sadly, I can't seem to get it working with my setup that heavily revolves around sticky layer keys. |
Happy to try to help troubleshoot if you want. |
I was actually able to get it working with another day of troubleshooting. Thanks for the offer though! I uploaded my solution on this branch of my config: https://github.com/kvietcong/zmk-config/blob/layer-lock/config/the_abyss.keymap I did some things to try cutting down on the config noise and it works for the most part. However, this method doesn't work really well with the nice!view display and does feel a little jank with the extra noise in the config. I still appreciate the workaround though! I will still keep this issue open as I do feel this issue warrants a dedicated feature rather than a conditional layer workaround. It'd be super nice to just have a key to lock all layers currently activated instead of defining three layers for every one functional layer. |
I totally agree this should be a built-in feature. I'm actually wondering if there's a way to restrict the nice!view to only look at the first several layers to resolve this in the meantime. I have a lot of layers in my keymap for this sort of thing and it would be useful to mask them out somehow for displays. |
Hi, I'm coming from QMK and there was a userspace library that was incredibly helpful: https://getreuer.info/posts/keyboards/layer-lock/index.html. It allows you to lock a layer when you are accessing it through some temporary means. So if you had a momentary layer key, holding that down and then pressing this layer lock key would essentially toggle it on. The blog post I linked goes into more depth. It also has the C implementation linked, which is under the Apache license. However, it is in a repo with GPL code (a QMK repo).
This is similar to #1299 but a &df solution (changing the default layer just to lock a layer temporarily) seems too heavy handed.
The text was updated successfully, but these errors were encountered: