You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a navigation layer on space. There, I have navigation mappings for my window manager. But I would also like to have two variations that will change the behaviour of the d and f keys when the tab key is hit. And be able to go back and forth between the variations still by using tab.
Except for this subtle change of d/f, all the rest of the mappings are the same and I have plenty of them. I could define two variation layers nav_variation_one and nav_variation_two and swap between them when tab is hit. However, this would make me duplicate all the rest of the mappings except d/f for both layers. Here is an example:
[main]
space = overloadt(nav_variation_one, space, 150)
[nav_variation_one]
tab = swap(nav_variation_two)
# the only part that changes for this variation
d = S-tab
f = tab
# plenty of common mappings
q = M-1
w = M-2
e = M-3
...
[nav_variation_two]
tab = swap(nav_variation_one)
# the only part that changes for this variation
d = M-S-tab
f = M-tab
# plenty of common mappings
q = M-1
w = M-2
e = M-3
...
And here I am only talking about two variations but if I want more, I have a lot of duplication happening.
This is not convenient and this is one of the reasons why I hit the descriptor limit as raised in: #876.
So I was wondering if I could use layering with a common layer below and two variation layers on top of it. This way, variation layers would only define d/f mappings and the rest would traverse to the underlying common layer.
But for that, I would need to be able to directly toggle the first variation as soon as the common layer is activated. Let me give an example of how I imagine that:
[main]
space = overloadt(nav_common, space, 150)
[nav_common]
# at activation find a way to:
# toggle(nav_variation_one)
# plenty of common mappings
q = M-1
w = M-2
e = M-3
...
[nav_variation_one]
tab = swap(nav_variation_two)
d = S-tab
f = tab
[nav_variation_two]
tab = swap(nav_variation_one)
d = M-S-tab
f = M-tab
I read the manpage extensively but I don’t find an easy way to do this. If overload would take a macro after enabling the layer, I could do toggle(nav_variation_one) but that is not the case.
Is there a way to achieve this that I would have missed? Thanks.
The text was updated successfully, but these errors were encountered:
At the moment the best way to achieve this is to put common bindings in another file and then include them. You cannot simultaneously toggle two layers, though I am playing with some ideas that may accommodate this in the next version.
Personally, I would do something like this:
/etc/keyd/common-nav:
q = M-1
w = M-2
e = M-3
/etc/keyd/main.conf:
...
[nav_variation_one]
d = S-tab
include common-nav
[nav_variation_two]
d = M-S-tab
include common-nav
The advantage of this approach is that you can easily recycle nav bindings between files which correspond to different devices. I frequently do this with my ergonomic boards and find it quite useful.
I have a navigation layer on
space
. There, I have navigation mappings for my window manager. But I would also like to have two variations that will change the behaviour of thed
andf
keys when thetab
key is hit. And be able to go back and forth between the variations still by usingtab
.Except for this subtle change of
d/f
, all the rest of the mappings are the same and I have plenty of them. I could define two variation layersnav_variation_one
andnav_variation_two
and swap between them whentab
is hit. However, this would make me duplicate all the rest of the mappings exceptd/f
for both layers. Here is an example:And here I am only talking about two variations but if I want more, I have a lot of duplication happening.
This is not convenient and this is one of the reasons why I hit the descriptor limit as raised in: #876.
So I was wondering if I could use layering with a common layer below and two variation layers on top of it. This way, variation layers would only define
d/f
mappings and the rest would traverse to the underlying common layer.But for that, I would need to be able to directly toggle the first variation as soon as the common layer is activated. Let me give an example of how I imagine that:
I read the manpage extensively but I don’t find an easy way to do this. If
overload
would take a macro after enabling the layer, I could dotoggle(nav_variation_one)
but that is not the case.Is there a way to achieve this that I would have missed? Thanks.
The text was updated successfully, but these errors were encountered: