Created attachment 69198 LockMods can lock another group This patch follows a different route: It extends modifier locking, rather than changing how group lock works. Extending has the advantage that the previous behaviour is maintained, and the patch does not violate the X Keyboard Protocol Specification. Extending modifier locking rather than group locking has the advantage that we do not need the "Kludge" of the other patch, as we can pass the modifiers that we want to set, rather then relying on heuristics.
The disadvantage over the existing patch is that we must change the keymap. Here are three examples. The left alt key is to switch to the next layout when it is pressed and released before any other key is pressed. key <LALT> { repeat= No, type= "TWO_LEVEL", symbols[Group1]= [ Alt_L, Meta_L ], actions[Group1]= [ Private(type=3,data[0]=1,data[1]=8,data[2]=8,data[3]=0,data[4]=0,data[5]=0,data[6]=1), Private(type=3,data[0]=1,data[1]=8,data[2]=8,data[3]=0,data[4]=0,data[5]=0,data[6]=1) ] }; Similarly, shifting group with Shift+Right Alt (where Shift is pressed first): -- You received this bug notification because you are a member of Ubuntu Desktop Bugs, 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 -- desktop-bugs mailing list desktop-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/desktop-bugs