-
Notifications
You must be signed in to change notification settings - Fork 125
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
leader key needs optional layer toggle #251
Comments
It sounds like there are two asks:
For 1, I agree that this doesn't seem like it can be emulated properly purely in the configuration. For the code changes, could add code here to save the current layer and enter a new layer
And in the various locations of this line occurring, can restore the old layer:
The For 2., this sounds like a lot more work to do in the code. But perhaps you can emulate it in the configuration with:
This configuration would allow |
For 1, I have to try setting up Rust and customize code, haven't done that with Rust code yet For 2, I also think the leader and sequence is adequate as it is, the improvement I suggested are good to have and the config can be made without using leader on number or special layers, and also in a different way to trigger stuff. update: I tried again and the second approach should work, as well as the 'sldr' will take different keys, as my post below using this technique triggers two different keys |
The first problem also works without changing source code based on your example, the below code changes to different layer while grv key is held and any one of a, s, d or space pressed, irrespective of current layer not having exact keys required for sequence to trigger,
This works but one small bug or not I don't know, when in insert mode I have to use @gli instead of @gld and switch to different input mode layer to work, otherwise it locks up and further leader presses doesn't work, likely not re-launching current layer when it is already present is the reason (unrelated if anyone searching for vim style navigation, the below link to configuration does that based on above code, I use caps lock for triggering Enso launcher so caps is used everywhere https://github.com/santhoshr/Scripts/blob/main/kanata/c2ns2c.kbd) |
Interesting, I'm not sure if that's a bug or not either. I'll look into it. |
I can't reproduce anything that seems like incorrect behaviour when I test. If I change the
Aside: running kanata from the command line with the |
When I'm "switched" to symbols or navigational layer like arrows or mouse, leader key will be useless without input layer
I tried combining various options with multi, macro, fakekey but could not get leader to work when in non input layer
An optional leader construct with default layer to process sequence will be useful
Also is it possible to get multiple leader 'sldr' might stand for sequence leader, can we have 'sldr' for 's' character leader, so I define (defldr sldr input-layer) | (keyword ldr-name layer-to-be-held)
on defining sequence (defseq insert-mode (i) sldr) | (keyword seq-name seq ldr-name)
This way I can create cldr, slashldr etc
The text was updated successfully, but these errors were encountered: