It _is_ possible to setup xkb so that the group (i.e. layout) switch occurs on <Shift>+<Alt> (which means press and hold Shift, then press Alt - order matters) - and still <Alt>+<Shift>+<something> (first alt, then shift, then something) shortcuts work. All this without the need to recompile xserver.
Here's what I did:
$ setxkbmap us,cz
(just load the layouts I want to the server, switching not working yet)
$ xkbcomp $DISPLAY xkbdesc
(list the xkb description from server to a file named "xkbdesc")
Found partial workaround today.
It _is_ possible to setup xkb so that the group (i.e. layout) switch occurs on <Shift>+<Alt> (which means press and hold Shift, then press Alt - order matters) - and still <Alt>+< Shift>+ <something> (first alt, then shift, then something) shortcuts work. All this without the need to recompile xserver.
Here's what I did:
$ setxkbmap us,cz
(just load the layouts I want to the server, switching not working yet)
$ xkbcomp $DISPLAY xkbdesc
(list the xkb description from server to a file named "xkbdesc")
Now two little changes to xkbdesc:
change1:
key <LALT> { [ Alt_L, Meta_L ] };
to
key <LALT> { [ Alt_L, ISO_Next_Group ] };
change2:
key <RALT> {
type[ group1] = "TWO_LEVEL",
type[ group2] = "ONE_LEVEL",
symbols[ Group1] = [ Alt_R, Meta_R ],
symbols[ Group2] = [ ISO_Level3_Shift ]
type[ group1] = "TWO_LEVEL",
type[ group2] = "TWO_LEVEL",
symbols[ Group1] = [ Alt_R, ISO_Next_Group ],
symbols[ Group2] = [ ISO_Level3_Shift, ISO_Next_Group ]
};
to
key <RALT> {
};
then
$ xkbcomp xkbdesc $DISPLAY
(load kbdesc to the server; ignore the warnings)
and voila! Shift+Alt (in that order) switches us<->cz keyboard and Alt+Shift+Tab works like it should.
I was actually quite surprised when I found this.
PS: Next time you start X, you can do just the last step, supposed you keep the xkbdesc file.