GNOME Bugzilla – Bug 430637
Keyboard layout change on hotkeys press instead of release and do not work well with shortcuts
Last modified: 2012-02-09 12:03:47 UTC
The bug has been opened on https://bugs.launchpad.net/ubuntu/+source/control-center/+bug/36812 "I have Ctrl+Shift set to layout switch and press ctrl+shift+N (to open new Terminal or new tab in Opera) -- as a result I have my keyboard layout switched. This happens because Ubuntu (or XOrg?) change layout on key press instead of release and do not match layout hotkeys with application shortcuts. MS Windows do. If layout change hotkeys is pressed with another key this must be treated as application shortcut and layout must not be changed. Combined with shortcut bugs in some Linux applications [Bug 2561] this makes keyboard shortcuts nearly unusable in default bilingual configuration. ..."
NOTGNOME. That's the way X works.
I can add that this happens because of GNOME also, not just X.org. If i set "alt-shift" in xorg.conf for layout change, and for "ctrl-shift" in gnome, the "ctrl-shift-u" or "ctrl-shift-s" etc. shortcuts DO NOT work. It just changes the layout. So it's not X.org.
It is really Xorg. Once Ctrl-Shift is assigned to be layout switcher (and GNOME just delegates this setting to xorg - GNOME does not intercept it itself) - Xorg can only use that shortcut for layout switching, nothing else.
Ok, i'm sorry, don't know how the backend works, but here is exactly what i saw, this is a little report: As soon as gnome and xorg can have different settings for layout switching, i left it for "alt-shift" in XORG and for "ctrl-shift" in GNOME (1), the (2) will be vice versa. (1) When the XORG layout is changed (when pressing "alt-shift") i get the "scroll lock" LED lit up. Pressing that again turns it off. However, the input layout is not actually changed. In GNOME in contrast, when i press "ctrl-shift" the LED is not lit, but the input layout is changed. This makes the "scroll lock" LED absolutely independent of the actual input layout, and also shows that both the settings are on, and are not completely supressed by each other. The "ctrl+shift+something" shortcuts DO NOT work. (2) So, as i've said, here "ctrl-shift" stands for XORG, and "alt-shift" for GNOME. The situation is practically the same, i.e. "ctrl-shift" lights up the LED, and "alt-shift" changes the input layout. But the "ctrl-shift-something" shortcuts DO work.
And in conclusion, i've figured this out: If you have "ctrl+shift" in xorg.conf for layout switching, and "left ctrl+shift" in gnome, the "right ctrl+shift+something" combinations DO work (though the layout is not changed, and the LED lights up).