2 min read

Battling Keyboard Layouts in Gnome 3

I like Gnome 3, a lot. I think it's one of the most productive, usable, and modern desktop environments out there from an HCI and End-user perspective. It's sleek, it feels fast, and it really does get out of the way to let me do my work efficiently. On one point, however, the Gnome 3.6 version included with Fedora, OpenSuse, and the like, has a glaring fault. After weeks of attempting to find a workable solution, I've been unable to determine a way, within the Ibus Keyboard Layout handling of Gnome 3.6 to actually have a workable layout switching policy. Most people switch between keyboard layouts only occasionally, meaning that having a quick keyboard shortcut that they can memorize to switch back and forth is good enough for them. Even the Gnome Tweak Tool means that some odd keyboard shortcuts for switching layouts are supported, though you have to do a bit more work to get them.

I am not like other people who use multiple keyboard layouts. I use the Unified APL Keyboard, which takes the form of two distinct keyboard layouts in Linux. Firstly, your base layout, which is the native keyboard for your native tongue or whatever you are using, and then, another keyboard that contains two levels of APL symbols. When writing APL code, I might swap back and forth between these two layouts once for every character that I type! A multi-character, or even single character keyboard short cut for switching is just not going to work. It can easily triple the number of character that I have to type, and make it very difficult to get anything done.

The method normally used in this case is to enabled the grp:switch option in X.org, or one of its equivalents, which allows layout switching when a key is depressed, and then switch back when the key is released. In old Gnome this was called something like "Right Alt (while pressed)" in the options. It worked great. Set whatever keys you want to work to the Mode_switch in Xmodmap and things just work. It's how some people use their AltGr keys. It has a lot of reasons for use, including people who only need the other keyboard occasionally for typing strange symbols. It means that you effectively get a second shift key to work with and two extra characters per keyboard (at least) that you can use to type with.

Try as I might, I have been unable to determine how to accomplish this from within either the 3.6 or 3.8 frameworks. It's not documented anywhere that I can tell, and I get crickets and other insects chirping at me when I ask about it in any of the mailing lists or IRC channels that I have attempted. This left me with no choice but to disable the Ibus support and the nice Gnome 3 keyboard layout handling, to go back to the X.org approach, which works, is stable, and is remarkably fast. Maybe someone will wake up and realize that this ought to be an easy fix for the Gnome 3 people and can only increase usability. Well, we'll see.