Comment 14 for bug 251443

Revision history for this message
Simos Xenitellis  (simosx) wrote : keyboard layout switching shortcuts like Alt+Alt do not work anymore

Binary package hint: xorg

(Report https://bugs.edge.launchpad.net/ubuntu/+source/xorg/+bug/196277 used to cover two separate but similar looking bugs. We split them now, and here we describe one of the two bugs. The other bug has to do with autologin, which when enabled, ignores any keyboard layout settings that have been configured in GNOME, the graphical interface).

In the keyboard layout preferences, you can set "Both alt keys together change layout", which worked in Gutsy for toggling between keyboard layouts.

Currently:
* "both alt keys..." does not toggle keyboard layouts
* "both ctrl keys..." does not toggle keyboard layouts
* "both shift keys..." works fine
* "Alt+shift" works fine

Steps to reproduce it are:
* Visit System->Preferences->Keyboard-Layouts
* Press Add and add a new layout.
* Close preferences.
* Open Text Editor or whatever you want and write something with Double-Alts it switch layout and writes with the other layout
OK till now.
* Reboot.
* Open a text editor and try to switch layout... Boom! It doesn't work!

Temporary Workaround. Open Layouts again and remove/add the second layout to start working again.

another workaround using a script: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/196277/comments/60

The text in the applet will change, to make it appear to be setting the correct layout, but the changes do not take effect.
Actually shortcut doesn't work at all, I set to be alts toggle in keyboard preferences, and it doesn't work, another thing is that even with keyboard indicator applet you change language, it doesn't changes, name in the applet changes, but it doesn't work. I need to open keyboard preferences, layout options, remove the tick and then put it back on keyboard layout switching shortcut.. As I said, shortcut doesn't work after this, but applet starts to change the layout, not only letters on itself.

This issue has been sufficiently confirmed. Please do not comment on this bug unless you have some information that will help solve the bug.

[Background]
Both Canonical and upstream are aware of this issue and consider it of high importance. Unfortunately, the root cause is not something that can be easily fixed.

The issue is that to solve this problem, we need to have a way to save the ExplicitVModMapMask, which is tracked okay in memory but not when the configuration is passed via XKM binary files, because the XKM binary file format simply doesn't have a field for storing the VModMask flag data. The XKM file format allows only 8 flags to be set, and there are already 8 defined. See the upstream bug report for details: https://bugs.freedesktop.org/show_bug.cgi?id=4927

Upstream's proposed solution to the problem is to remove the xkbcomp design and the xkm file format entirely, and switch to new X input technologies. This will be a fairly sizeable re-architecting effort, and will take time to complete. If you would like to help contribute to this solution for this problem, please work with Sergey Udaltsov.