This shows you the differences between two versions of the page.

Link to this comparison view

computing:xkb_cyrilik_translit [16.06.2010 19:35] (current)
Line 1: Line 1:
 +====== Russian Keyboard Emulation ======
 +Since my wife is Russian I am writing in Cyrillic from time to time. However, not often enough to
 +learn the Russian keyboard layout. There are several options available under X (Linux) ​
 +which did not really satisfy me. The one that come closest is a phonetic version of the RU keyboard (variant: phonetic). There is also one from the US keyboard called rus. Both not brilliant in my eyes.
 +The point is that I got already a bit used to a Latin-Cyrillic transliteration that is used
 +by the Russians if they have to use Latin characters, e.g. with texting (SMS). You can find it at www.translit.ru.
 +Looks like a challenge to go for.
 +===== Technical Details =====
 +To write a keyboard layout for xkb, the X-keyboard tool is normally very easy, but now
 +comes the problem: consider the following key assignments:​
 +   ​j ​ -> й
 +   jo -> ё
 +   ja -> я
 +And there are plenty of such things.
 +That means I need j to be a dead key. However we want to use j also as a 
 +normal key. My workaround is to define a lot of compose rules, ​
 + which are normally used to create characters with ascents (e.g. german keyboard layout)
 +This means for any combination of j with another key X being 
 +not "​o"​ and "​a"​ one has to create "​йY"​ where Y is the corresponding character for key X.
 +Since one needs a rule for each other key on the keyboard for all the dead keys 
 + this asks for a generating script. ​
 +The perl-script can be downloaded {{:​computing:​translitcompose.pl|here}}.
 +===== Installation =====
 +The installation is pretty easy. You download the {{:​computing:​us|us}} file and store it under
 +/​use/​share/​X11/​xkb/​symbols. (You need superuser permissions for that.)
 +Then you also need to Compose rule which are in {{:​computing:​xcompose.gz|this zip archiv}}.
 +Unpack it and move to ~/​.XCompose.
 +Then you have to select the us keyboard with variant "​translit"​ and you are done. I use KDE keyboard tool for it
 + which works great. You can also set an alternative switching key for the keyboard layouts in your shortcut manager. In KDE this is in ''​System Settings->​Keyboard and Mouse''​. Please note that you have to restart you X-applications ​
 + in order to activate the compose rules.
 +===== Usage =====
 +It really works like on www.translit.ru with a few little differences. First of all you can force a dead key to show by either pressing ''​q''​. The key ''​q''​ is not used otherwise. You need this if multiple deadkeys follow eachother, e.g. in two c in Россия (meaning Russia). Here is the translation table. ​
 +|а|б|в|г|д|е|ё |ж |х|и|й|к|л|м|н|о|п|р|с|т|у|ф|х ​ |ц|ч |ш |щ|ъ|ы|ь|э|ю|я|
 +{{tag>​computing perl}}

computing/xkb_cyrilik_translit.txt · Last modified: 16.06.2010 19:35 by georg