Having &num_word on the same layer as num layer does not work
I have a slightly customised Miryoku layout where the numbers on a separate layer. Right hand thumb key activates the numbers layer and all numbers are on the left half. The right half has only the home row modifier keys mapped. I wanted to have a num_word key mapped to a key on the same layer (on the right half) so I can go to the num layer, activate the num_word and then stay locked in this layer for as long as keys in the continue list are entered and then go back to default layer.
You can see my attempt to do this here but it doesn't work as expected -- pressing the &num_word key has no observable effect.
Then, I moved they &num_word key to the nav layer (here) and then it works as documented.
So basically, my question would be: is there any implied relation to the layer number and activation key placement layer?
Thanks for reporting, can you describe what's happening? Also a link to your keymap could be useful.
Sorry about the terse issue description; I was too sleepy then and did a sloppy job :)
Fixed that now by editing the original comment for better visibility.
Thanks for clarifying. The issue is that when you release your right thumb, it is deactivating the numbers layer. (Holding < resolves to &mo which sends zmk_keymap_layer_deactivate when being released).
I don't see an easy way to prevent this with the current ZMK API.
However, there is an open PR which adds a locking property to layers (https://github.com/zmkfirmware/zmk/pull/2717). If that gets merged, we could add an "lock" option for auto-layers that prevents them getting deactivated by other behaviors.
Make sense, thanks for the explanation.
This should be fixed in b1b4b1c.
For now, the commit is only in next. It will get merged into main once ZMK v0.4 gets released. If you want to try it out now, you could build against the development branches of both repos:
manifest:
remotes:
- name: zmkfirmware
url-base: https://github.com/zmkfirmware
- name: urob
url-base: https://github.com/urob
projects:
- name: zmk
remote: zmkfirmware
revision: main
import: app/west.yml
- name: zmk-auto-layer
remote: urob
revision: next
self:
path: config
Thanks @urob. I was watching that PR. Will give this a try soon and report back.
Works exactly as I wanted. Thank you very much.