Conversation
c986393 to
ddbc05d
Compare
b1cd1e8 to
6066fd2
Compare
AlexCzar
left a comment
There was a problem hiding this comment.
Thank you so much, leader key is a very nice feature to have. Just a couple of questions/suggestions regarding the documentation.
Can't wait for this to be merged 👍🏽
petejohanson
left a comment
There was a problem hiding this comment.
One important high level question on the design.
Thanks!
|
Any update on this branch merging to main? |
|
I don't understand the difference of this "leader key" and a sticky layer. Can someone differentiate? |
you can do more than 2 key presses and it can chain arbitrary long sequences as the triggers. e.g. "super > s > e" for "leader key" > "shortcuts" > "email" to trigger spelling your email address (or anything you want). |
Other uses I use leader keys in QMK is (all are for windows) Leader Key + B O O T = qmk reset I'm hoping that this gets reviewed and can be merged into the main branch though as this is a major component that makes my 32 key keyboard work in QMK (along with tap mods, tap dances autoshifts, custom autoshift keys) |
petejohanson
left a comment
There was a problem hiding this comment.
A few more items from my first pass at looking at this again. Thanks again for working on this!
| const struct device *dev = device_get_binding(binding->behavior_dev); | ||
| const struct behavior_leader_key_config *cfg = dev->config; | ||
|
|
||
| zmk_leader_activate(cfg->timeout_ms, cfg->timerless, event.position); |
There was a problem hiding this comment.
If you press this again while it's active, should the behavior be to deactivate to interrupt it?
|
Please try to finish this feature... I will soon try to merge it on my branch, but it would be great to have it on master. I do not understand how people are not showing more interest for it. If it is easy to add key sequences(similar to vimrc) then it would be even better, but I think that can be done with a custom function... The main thing is having it on master and bugfree:) Thank you all but especially @nickconway and @petejohanson for working on it🙂 |
|
Is there any limitation regarding number of sequences that can be created? For combos there are (I think) 5 combos that can use the same key position. Could one create e.g. 900 sequences: leader + letter_1 + letter_2 = shortcut/macro? |
|
I was a happy user of the leader key feature in my previous zmk build. Recently I tried updating my firmware to the latest release of zmk (c9c620d) and also update from zephyr sdk 0.15 to 0.16. Everything seems to work, except for the leader key. The leader key acts like a transparent key. Also running the test tests/leader/basic fails: Could someone verify if the leader key works with zephyr sdk 0.16 and a recent version of zmk? Maybe I'm doing something wrong... |
|
I am guessing this needs to be rebased for #2028. |
|
I found why it wasn't working in Zephyr 3.5. This is what needs to be changed in order to make it work again: There are probably more changes to be made (#2028) to update everything to zephyr 3.5. |
|
Looking forward to this, great work! |
|
I have been using this for a while now and really loving it! Just a few small comments to nitpick here: Keycode vs position-based?I see advantages for both sides. But overall I tend to think that this one might be more useful being The main reason is that in my experience leader sequences are almost always mnemonic (or are otherwise remembered in terms of their alphanumeric sequence). With this presumption, making them Purpose of
|
|
If anyone is interested using this as a module that works without having to patch the ZMK firmware, I just pushed one to https://github.com/urob/zmk-leader-key.
EDIT: I ended up reimplementing the behavior, making some changes to fit my personal needs (keycode-based, allow multiple instances, ...). For anyone who prefers the original PR, there's a legacy branch that makes that available as module as well. |
|
I've merged in a bunch of changes just now, support for multiple instances, using child nodes, etc. Using the child nodes depends on a fix that hasn't yet been merged in yet (zephyrproject-rtos/zephyr#62417) but if I use a fork with the fix everything works as expected! (thanks so much @urob for maintaining your module all this time and finding that fix) |
|
@nickconway what is the latest on this? :) |
logically this should say to add `timerless` if you don't want the timeout
I fixed the link to the advanced config documentation
a388b41 to
a1389e7
Compare
Adds leader key functionality