How to set left alt + right shift keyboard layout switch in xubuntu

keyboard-layoutx11xkb

From what I found from xkeyboard-config man page there is no such combination, which is very upset. Is there any workaround for that?

Because I want layout change to be as in winXP.

Best Answer

Indeed it seems that the combination of Alt_L+Shift_R isn't provided by default.

But you can define it.

Look for example at this answer: How to put some keyboard layout aside from layout switching ring?

Just put in the mysymbols file a section like this:

partial modifier_keys 
xkb_symbols "l_alt_r_shift_toggle" {
    virtual_modifiers Alt;
    key <LALT> {
        symbols[Group1]= [ NoSymbol,    ISO_Next_Group ],
        virtualMods= Alt
    };
    key <RTSH> {
        type[Group1]="PC_ALT_LEVEL2",
        symbols[Group1]= [ Shift_R,     ISO_Next_Group ]
    };
};

and in the ~/.xkb/keymap/mykbd file, on the xkb_symbols line add "+mysymbols(l_alt_r_shift_toggle)"

Note, however, that this actually defines also Shift_l+Alt_l and Alt_R+Shift_R (actually, if shift (any shift) is pressed first, then the redefinition of Alt_R is triggered; and if alt (any alt) is pressed first, then the redefinition of Shift_R is triggered) To restrict the toggle to ONLY Alt_l+Shift_r it would require a lot more thinking and hacking, I don't think it would be worth the trouble.

Related Question