Is there an easier way to make mappings with modifiers? #475
-
Here is an example from my sxhkd config:
And here is me doing (nearly) the same thing in kanata:
Here's another example which I haven't ported yet, but you probably get the idea:
Is there an easier way to do this kind of thing in Kanata? I have a lot of these blocks and it's weird using a bunch of forks. Is it just something that will always be painful in Kanata because it doesn't really play into the chording/layer idea? Or is there perhaps a featureset we could add that might alleviate the pain? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Another approach but with use of layers:
For a large amount of similar remappings I think this could be overall cleaner. |
Beta Was this translation helpful? Give feedback.
-
What if we were to add a
Maybe some token should be used for the first branch too, like a Or
I don't like this as much personally because I like the modifiers better coming before the branch, akin to a switch/case/match statement. But it would work while maintaining backwards compatibility with the existing |
Beta Was this translation helpful? Give feedback.
What if we were to add a
fork
variant that accepted an arbitrary number of branches?Think of
fork
asif
andmulti-fork
(or whatever) as aswitch
.Maybe some token should be used for the first branch too, like a
_
orXX
or some other nil kind of placeholder, to make all arguments pairs for parsing reasons.Or
fork
itself could be changed to accept more pair arguments.