-->

Monday, September 26, 2016

Using Multiple Language Keyboards in Linux

Gnome is one of the more popular of the many window managers which can be installed and used to handle functionality of the graphical user interface (GUI) in Linux and other operating systems. One of the responsibilities of the GUI is to handle keyboard and language input.

Gnome version 3.14.2 is currently packaged with Redhat/CentOS 7.2. While it has problems in several application-level regards, using more than one language's keyboard is one way in which it performs quite well. I barely needed a brain to set up my laptop for English (Am.), German and Russian phonetic keyboards and in the eight or so months I've been using it, it has only once given me a problem... in the beginning when it went crazy for some unknown reason but then somehow fixed itself ten minutes later.

Setting it up — and changing the setup later — is simply a matter of clicking on the down-arrow icon in the panel, clicking on the "crossed wrenches" icon (Settings) in the subsequent mini-window, and then selecting from that next window "Region and Language". Adding, deleting, and changing languages are all self-explanatory from that point, except that some languages, like Russian, can be a bit involved as there are about twenty different variations under "Russian". These mostly cultural distinctions, though, not technical. I chose "Russian (phonetic American)" which is an approximation of a key-by-key transliteration. "Phonetic" means that, for example, if I type, "Now is the time for all good men to come to the aid of their party." with "Russian (phonetic American)" selected, the resultant text looks like this:

Нов ис тхе тиме фор алл гоод мен то цоме то тхе аид оф тхеир парти.

Among the other keyboard layouts under the general rubric "Russian", a few provide a "standard" sort of "Russian keyboard". However, configuring for a "standard Russian" keyboard, and, yes, even for a phonetic keyboard, introduces the dilemma of knowing which (English-labeled) key produces which Russian character. Of course, if you can touch-type in Russian and don't need labels on all the keys to tell you what they are, then you're already home. Otherwise, this problem can be solved in large measure by clicking on "Show Keyboard Layout". As the name suggests, this opens another window containing a representation of a keyboard and shows where all the characters are on the keyboard of the currently selected language. Display this windown by clicking on "Show Keyboard Layout" in the language selection dropdown, discussed next.

After more than one language has been configured, there is then a dropdown in the panel which both shows the current language and allows selection of another, already-configured language. A different configured language-keyboard can be selected at any time, even in mid-sentence inside any application. Note, however, that selecting a keyboard makes it effective for all subsequent applications and navigation. It is desktop-wide. In fact, once I blanked/locked the screen, and when I wanted to log back in, the password I knew to be correct was repeatedly not accepted. My difficulty turned out to be due to the fact that I had a non-English language selected at the time I locked the screen, so even what I typed for my password (which appeared only as dots) was being entered in the current (non-English) language. Fortunately, the currently effective language keyboard is displayed and selectable also on the log-in screen, so once I noticed that, I was able to change the language back to English and successfully log in.

Because Gnome underlies the entire GUI interface, changing the language will, as said, affect all the GUI applications and functionality used. So changing the language will change it for all applications currently running or which you may subsequently launch until you select a different keyboard language. For example, if, while working on a Russian document in emacs, you then want to read email in Thunderbird, Russian will be in effect there too, even for any and all navigation keys you might try. If you want to reply to an email in English, or use alphabetic keyboard characters to navigate, then you'll need to change the language setting again. Constantly switching languages in such circumstances may become a bit tedious. What might work for you better then would be to configure the desired language keyboard for just the application(s) in which you want to use that particular language, instead of for all keyboard input.

No comments: