How to setup kanata for Latin & Cyrillic layouts #1435
greqov
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is how I setup kanata to work with 2 languages: English and Russian.
Let's assume we have a system with 2 standard layouts: qwerty for English, йцукен for Russian. Switching between languages controlled by Shift+Alt shortcut.
I use alt layout for English, so let's create a layer (called sowa) for that layout. I will show only home row for the sake of simplicity:
If we switch (Shift+Alt) to Russian language right now we'll see wrong order for Cyrillic letters:
I also use alt layout for Russian so I expect to see the following letters on the home row:
з и о а к ё
. To make this happen I created a Cyrillic layer (called sowaru):The next step is to add a macro that switches both OS language and kanata layer:
After adding those
@EN
,@RU
macros to layers everything works like expected. Everything except shortcuts.For shortcuts on Cyrillic layer I want to press the same key as on Latin layer. For example, for
ctrl+x
shortcut I expect to press the first key on home (middle) row. But on our Cyrillic layer we havep
letter on that spot. To fix this issue let's temporarily switch to Latin layer on Ctrl/Alt/Shift presses. I use home row mods here but the logic will be the same for regular Ctrl/Alt/Shift keys:It works for single modifier key shortcuts. To make it work for multiple modifiers (like
ctrl+shift+t
) we have to add home row mods to Latin layer too:That's all.
Conclusion
We'd successfully setup kanata to work with EN/RU languages. Setup uses standard OS layouts qwerty/йцукен, no need to create custom ones.
Люди не должны страдать, машины должны страдать.
Beta Was this translation helpful? Give feedback.
All reactions