I want to share with the community my dislike for the cyclic switching of keyboard layouts. Cyclically is it like? This is when Russian is followed by English, Ukrainian is followed by Russian, English is again followed Ukrainian, etc.
To something, life is simplified when you get used to the asymmetric switching of layouts. This is when the switch to each layout corresponds to its own combination.
For example, if you want to English - press CapsLock (very often-thickly needed key, right?), Russian - Shift + CapsLock, Ukrainian Ctrl + CapsLock. Seem uncomfortable? No matter how wrong! When you get used to it, you can no longer lose
So how do you do it in your favorite X's? Here is a small keymap:
xkb_keymap {
xkb_keycodes {include "evdev + aliases (qwerty)"};
xkb_geometry {include "pc (pc104)"};
xkb_compatibility {include "complete"};
xkb_types {
include "complete"
type "THREE_GROUPS" {
modifiers = Shift + Control + Alt;
map [None] = Level1;
map [Shift] = Level2;
map [Control] = Level3;
map [Control + Shift] = Level4;
map [Alt] = Level5;
Level_name [Level1] = "Base";
Level_name [Level2] = "Shift";
Level_name [Level3] = "Ctrl";
Level_name [Level4] = "Ctrl Shift";
Level_name [Level5] = "Alt";
};
};
xkb_symbols {
include "pc + us + ru: 2 + ua: 3 + us (dvorak): 4 + level3 (menu_switch) + inet (evdev)"
replace key {
type = "THREE_GROUPS",
actions [Group1] = [LockGroup (group = 1), LockGroup (group = 2), LockGroup (group = 3), LockMods (modifiers = Lock), LockGroup (group = 4)]
};
};
};
The "zest" here even with the naked eye is noticeable. Well, and more. Of course, this config in each section can be supplemented with other definitions - this is just an ordinary keymap that is fed to xkbcomp.
In order for this config to work every time you log into your favorite DE, save the above config, say, in / usr / share / X11 / xkb / keymap / three_groups and write the following small script in /etc/X11/Xsession.d/60xkb-lang:
(
cd / usr / share / x11 / xkb / && xkbcomp keymap / three_groups $ DISPLAY &> / dev / null
)
true
A little note at last. Already several times when updating my favorite Debian, I encountered the problem that the developers rewrote something — redefined it in xkb, as a result of which it was necessary to re-try and re-shovel the config to find the right combination include in symbols.
Once, once again being updated, I found out in my frustrated feelings that the Up, Down, Left, Right, Home, etc. keys did not work out for me. when my keymap is compiled. But it works great with, so to speak, the default settings in Gnome. A simple command line running with default settings:
xkbcomp $ DISPLAY - | egrep "^ xkb_"
allowed to see the desired combination for include. There will be about the following conclusion:
xkb_keymap {
xkb_keycodes "evdev + aliases (qwerty)" {
xkb_types "complete" {
xkb_compatibility "complete" {
xkb_symbols "pc + us + ru: 2 + ua: 3 + us (dvorak): 4 + level3 (menu_switch) + inet (evdev)" {
xkb_geometry "pc (pc104)" {
I remember that there was no limit to happiness! ;)
')
Well, actually, on this optimistic note this note can be finished. Try asymmetrical switching of layouts, get used to it - it will be difficult to refuse;)