
Greetings,% username%.
Many people from the countries of the former USSR, like me, have to use a third, if not more, alternative keyboard layout. In this case, as a rule, layouts differ from Russian in a pair of characters and are rarely used. In such a situation, there is a problem with switching layouts. Some use all three, and are constantly confused between them. Some, like me, use only two basic ones. When you need a third alternative, they climb into the settings and add it. This creates some inconvenience.
In this topic, I want to briefly describe ways to solve the problem, show one of the solutions and listen to the advice of smart people.
You can consider two approaches to solve the problem:
- using shortcuts to play the right characters
- convenient layout placement
Using Keyboard Shortcuts
Since the differences between the alternative layout from the Russian in a couple of characters (for Ukrainian it is
i, ї, є ), you can set and learn hot keys to play them. There are several solutions:
Using Unicode Characters
In Linux, to register a Unicode character through its code, you need to hold down
Ctrl +
Shift , press and release the u key and set the hex code of the character. Then release
Ctrl +
Shift .
Codes for Ukrainian characters:
- i - 0456
- І - 0406
- ї - 0457
- Ї - 0407
- є - 0454
- Є - 0404
Can be used if good memory. It does not work everywhere, for example, in chrome in the textarea element does not work.
')
Using Compose Keys
There is a compose key that allows you to type various characters through combinations. You can read on wikipedia for Compose. It is possible to determine their combinations. I think it would be nice to output
i using
Compose + s + s , and
Compose + O + O - Є.More information about the set of non-printable characters can be found in this
article .
Convenient layout placement
You can generally move away from the concept of switching layouts. For each layout use an individual hotkey, and use it. There will be no confusion in this case, but you also need some time to get used to it.
And you can another way. There are two main layouts (English and Russian) that are used in everyday life, and there is a convenient mechanism for activating the third layout. It would be ideal if all the layouts are indicated in the settings, but only two main switches are used. And the third is activated by selecting from the menu with the mouse, or with a special hotkey. Alas, I did not find a simple implementation of this method in the gnome (Ubuntu). Therefore, I did a little
through jo showing a fantasy.
The bottom line is to make the switch layouts. In one position there will be basic layouts, in the other - alternative ones. I made a simple script that I put in
/usr/bin
and call it via hotkey. Here is the script code:
#!/bin/bash
if [[ `gconftool-2 --get /desktop/gnome/peripherals/keyboard/kbd/layouts` == "[us,ru]" ]]
then
gconftool-2 --set /desktop/gnome/peripherals/keyboard/kbd/layouts -t list --list-type "string" [us,ua]
else
gconftool-2 --set /desktop/gnome/peripherals/keyboard/kbd/layouts -t list --list-type "string" [us,ru]
fi
I think it is not necessary to comment on the code. You can, if you want, just leave
[ua]
instead of
[us,ua]
. I left it for more versatility.
Comment, criticize, offer your solutions. Good luck!