You are not logged in.
I found some old tutorial to assign left alt+shift to 1st layout and right alt+shift to 2nd layout. How to adapt it to the modern hal way?
Here it is:
create $XKBROOT/mysym :
partial modifier_keys xkb_symbols "shift_ctrl_1" {
key <LFSH> {
type="PC_BREAK",
symbols[Group1]= [ Shift_L, ISO_First_Group ]
};
key <RTSH> {
type ="PC_BREAK",
symbols[Group1]= [ Shift_R, ISO_Last_Group ]
};
key <LCTL> { [ Control_L, ISO_First_Group ] };
key <RCTL> { [ Control_R, ISO_Last_Group ] };
};
add 1 line to $XKBROOT/rules/xorg (after "! option = symbols"):
! option = symbols
myshiftctrl1 = +mysym(shift_ctrl_1)
add option to xorg.conf :
! option = symbols
Section "InputDevice"
...
Option "XkbOptions" "myshiftctrl1"
EndSection
Arch 64, xfce4
Offline
Found a temporary solution. Unfortunately It resets other options set in the corresponding gnome applet;
Instead of alt+shift it sets shift+alt to change layout. I tried to swap the key names in 'mysym' file, but it has no effect.
#!/bin/sh
xkbdir="`mktemp -d`" || exit $?
mkdir "$xkbdir/symbols"
cat>"$xkbdir/symbols/mysym" <<EOF
partial modifier_keys xkb_symbols "alt_shift_1" {
key <LALT> {
type="PC_BREAK",
symbols[Group1]= [ Alt_L, ISO_First_Group ]
};
key <RALT> {
type ="PC_BREAK",
symbols[Group1]= [ Alt_R, ISO_Last_Group ]
};
key <LFSH> { [ Shift_L, ISO_First_Group ] };
key <RTSH> { [ Shift_R, ISO_Last_Group ] };
};
EOF
setxkbmap -symbols "pc+us+ru:2+inet(evdev)+mysym(alt_shift_1)" -print | xkbcomp -w0 -I -I"$xkbdir" -I/usr/share/X11/xkb - $DISPLAY && rm -rf "$xkbdir"
Arch 64, xfce4
Offline