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 ]
      };
to
      key <RALT> {
          type[group1]= "TWO_LEVEL",
         type[group2]= "TWO_LEVEL",
         symbols[Group1]= [           Alt_R,  ISO_Next_Group ],
         symbols[Group2]= [ ISO_Level3_Shift, ISO_Next_Group ]
      };


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.

-- 
You received this bug notification because you are a member of Ubuntu-X,
which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/36812

Title:
  Keyboard layout change on hotkeys press instead of release and do not
  work well with shortcuts

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-control-center/+bug/36812/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-x-swat
Post to     : ubuntu-x-swat@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-x-swat
More help   : https://help.launchpad.net/ListHelp

Reply via email to