-
Hi, I am fairly new to Kanata, I have made a few layers and like it so far but I ran into an issue trying to add the following: I have a layer that changes my home row into arrow keys, this is handy to navigate text, but I would also like to navigate word by word (by holding down ctrl) and select text (by holding down shift). Pressing both these keys while also pressing the arrow layer toggle key and arrow keys is inconvenient, so I am wondering if there is a way to press a ctrl or shift key, and have it stay pressed/activated until I press it again. I went over all actions in https://github.com/jtroo/kanata/blob/main/docs/config.adoc#actions but I could not find a way to do this. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
You can achieve that using fake keys: https://github.com/jtroo/kanata/blob/main/docs/config.adoc#fake-keys |
Beta Was this translation helpful? Give feedback.
-
Thank you, I was able to use fake keys to activate/deactivate CTRL with a config that looks like
However from there I could not figure out how to toggle the activation/deactivation with only one key. I think it would require fake keys to support a toggle kind of action, or the ability to access the state of modifiers and select an action based on that in the config. I ended up using the cmd action and a bash script based on xdotool to get the toggle down to one key. |
Beta Was this translation helpful? Give feedback.
-
I've had a similar problem before, and it can be solved without using cmd. Take a look at this: #393 |
Beta Was this translation helpful? Give feedback.
-
But something like |
Beta Was this translation helpful? Give feedback.
I think
(fork (on-press-fakekey ctl press) (on-press-fakekey ctl release) (lctl))
should do the trick.