I just discovered that I couldn't add more than 4 layouts for my keyboard. Googling revealed that it was a universal limit (at least for GNU/Linux) and the only way(s) to get around it was to use some hackish way with scripts. Is there really a technical reason behind this? If yes, what is it?
Quoting Peter Hutterer (Red Hat employee working on X.Org):
Why we don't have a hack above this layer - I don't know... this must be the lamest limitation ever. :D
I frequently write in English, German, Swedish and Chinese. This is four, but I am learning Russian as well and would appreciate the extra toggle via the GUI. Scripts is a workable resolution in the meantime:
http://ubuntuforums.org/showthread.php?p=10333055#post10333055
One might note that with Russian, one has the option of either the 'standard' Russian keyboard layout, or a much more convenient (for those of us learning) phonetic layout paired to QWERTY.
Also, many of us use some form of Dvorak, which also takes a position.
Hence, my computer looks like this:
Keyboard layouts:
USA Dvorak (programmer) Swedish German Russian Russian phonetic
and there is an additional keyboard icon with an ibus toggle for Chinese Pinyin.
The protocol sets aside two bits for keyboard switching. This is two more than many people need. Most of the users I have seen switching keyboard layouts use two; a local layout and and international layout. The international layout usually handles composition of all require keys. This leaves one excess bit. I have seen users with three layouts, but usually one is never used.
I would be interested in what you are doing that requires more than four layouts, and how you work with constantly changing keymapping. I find it difficult to get users used to two layouts, even when it solved problems they have with internationalization.