A small, very small guide for those who are still suffering or very little suffering with switching layouts in KDE from Russian to Latin and vice versa. Objective: to make "as in Windows." Namely, in addition to switching the layout, to achieve the preservation of its state in each window.
1. We repair the switch.
To make the switch itself work, go to the following path:
“KDE menu” => “System Settings” => “Regional & Language” => “Keyboard layout”.Here we delete everything except our native Russia. Do not worry, the Latin layout will be. Just tick the
"Enable Latin keyboard" checkbox. Everything, the problem of switching is solved. And here another problem arises: the flags of the countries do not change when switching layouts.

')
2. Configure the indicator.
This is where the wonderful program
kkbswitch by the wonderful Ukrainian programmer
Leonidna Tseitlin comes to the rescue. For example, in Kubuntu, it is installed like this:
sudo apt-get install kkbswitch
After installation, the tray icon will appear. For some reason, instead of the Russian tricolor, I had a white square with the number “2” by default. In the settings you can change the icon.
And you can put a letter display, if you do not like the boxes.

3. Preservation of the state of the layout in different windows.
It's a matter of taste. For those who need it, we climb into the kkbswitch settings, and in the list
“Layout valid for:” select the option you need. Now, when switching, for example, to the console, you will not need to switch the layout to the Latin alphabet, if you have just written a Russian letter in your email client.
4. Change flag icons.
To me, the "native" icons of kkbswitch seemed not beautiful. If you think so too, you don’t need to go far for nice flags. They are within Habr:
habrahabr.ru/blog/iconoskaz/33750.htmlDownload, unpack and change the icons in the settings.

5. A little more.
To item "1":
Do not forget to select the item
“winkeys” in the list of
“Layout option” , otherwise you will have a comma on the “seven”, the letter “e” on the tilde and so on.
Customize keyboard shortcuts (for example, many familiar Ctrl + Shift) can be in the same place, in the tab
"Options HKV .
" Here you can also turn on the LED display on the keyboard (the included Scroll Lock is Russian, the disabled is Latin).
Also check
"Ignore system parameters" .
PS Of course, this guide is not only about the Russian layout. In its place can be any other that you use. I know that the topic is already rubbed, but this problem is very popular against the background of mass “ubuntunization” and in order not to explain the same thing to people every time, you can “throw” a reference to this manual.
Additionally:Setting up xkb - the standard KDE switch system.
Partial solution to the problem of non-working combinations with the Russian layout from
m11 : using the installation in Control Center => Keyboard Shortcuts => Application Shortcuts as alternative shortcuts for Paste - Ctrl + M, for Cut - Ctrl + H and so on .
How to set up switching layouts in the X-server (xorg, XFree86)?xneur (analogue of Punto Switcher) +
kxneur (frontend for xneur)