Comment 184 for bug 1245473

Revision history for this message
In , Oded Arbel (oded-geek) wrote :

(In reply to comment #108)
> I don't know what they have done in Ubuntu but 12.04 understands both press
> and release. Layout switching happens on release.

Ubuntu have simply applied Ilya's patch (one of the revisions attached here) to fix the layout switching problem.

> If you press Alt you see
> the global menu and after release HUD uppears.

This is a different behavior and one that works with the pristine X.org server - the ALT key, when used without any other shift keys, fires "down" when pressed and "up" when released. The Ubuntu HUD listens for this sequence and triggers when ALT is used like that without any other shift key.

The problematic behavior (as documented in this lengthy bug report - kitates, please read the discussion), is that when you press down on the second shift key, X.org fires the keyboard layout change (problem 1) and also immediately fires the "up" event for the second shift key, even though the user is still holding the key down (problem 1).

Problem 1 means that when the user wants to use <shift1>+<shift2>+<key> as a keyboard shortcut (when "shift1" and "shift2" are the shift keys used for layout switching, for example ALT+SHIFT or CTRL+ALT), then the user will inadvertently also trigger a layout switching that wasn't supposed to happen.

Problem 2 means that the actual keyboard shortcut will never actually trigger because when the user holds down <key>, even though all keys are physically held down X.org only acknowledges that <shift1> and <key> are held down.

> Looks like everything has
> been fixed. But if you use Ctrl or Alt for layout switching you still can't
> use this key for anything more, it's "exclusived" :( So ridiculous.

It shouldn't work like that - I've tested the Ubuntu built X.org (with Ilya's patch) and it worked properly when using CTRL+ALT as the keyboard switching. It was immediately after the patch got accepted (at 11.04) but as ALT+SHIFT still works fine, I don't see a reason everything shouldn't continue to work (though I don't have access to an Ubuntu machine ATM to test).