Comment 17 for bug 150702

Revision history for this message
Adam Purkrt (adam-purkrt-deactivatedaccount) wrote : keyboard layout switching collides with windows navigation, when <alt><shift> is used to change keyboard layouts

New observation - windows navigation collides with keyboard layout switching, when <alt><shift> is used to switch among keyboard layouts (and it does not have to/should not).

How to reproduce:
1) Assign <alt><shift> to keyboard layout switching: System/Preferences/Keyboard/Layouts/Layout Options/Layout Switching/"Alt+Shift change layout"
2) Now the pressing of <shift> during the windows switching initiated with <alt><tab> has no longer effect on the direction of switching.

<alt><shift> is the MS Windows standard way for switching keyboard layouts and many people may find it convenient to use it (I do), so it would be good if this was fixed.

Actually this is not a bug in metacity/compiz, but an oversimplification in the keyboard layout switching. When "Alt+Shift change layout" is set, then whenever <alt> is down and <shift> is pressed, the layout is switched (and <shift> press does not propagate), regardless of the history of presses and/or releases (it does not wait neither to the release of <shoft> nor <alt>; to see this, add "Keyboard indicator" to a panel).

When using "Alt+Shift change layout", the keyboard layout should be switched _only_ when: (beginning with no key on the keyboard pressed) first <alt> was pressed and held and then <shift> was pressed (and possibly released and pressed again, possibly multiple times) and then <alt> was released, _with no other key (than <shift>) being pressed while <alt> was held_. Pressing any other key then <shift> (<tab> for example) while <alt> is held should simply invalidate the possibility of the layout switch (...until the release of all the keys). During the actual layout-switch, the <shift> could be possibly pressed (and released) multiple times, the number of _presses_ (release not required) determining how many steps to advance in the (wrapped around) list of available keyboard layouts (this is mostly about the case when there is more than two layouts).

In other words, the keyboard layout changing should work much like windows navigation (probably also with the reordering of the list of layouts, as <alt><tab> does with the list of windows, i.e. the most recently used layouts would be easily switchable), except for the <tab> being substituted with <shift> and the fact that the layout changing could be possible only in one direction.