I have two keyboards: an old ps/2 one and a usb one. I want the usb keyboard to have the us layout (or prefferably have the usb keyboard follow the layout chosen in gnome) and the ps/2 one to have a custom layout (shortcuts and other things :D). I've tried to set seperate layouts on each keyboard at runtime using
setxkbmap -device 8 -layout ru (russian layout to test), but this sets the layout on all keyboards to russian.
philippe@tnw:~$ xinput -list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ MOSART Semi. Wireless Keyboard & Mouse id=9 [slave pointer (2)] ⎜ ↳ Logitech USB Receiver id=10 [slave pointer (2)] ⎜ ↳ Logitech USB Receiver id=11 [slave pointer (2)] ⎣ Virtual core keyboard id=3 [master keyboard (2)] ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] ↳ Power Button id=6 [slave keyboard (3)] ↳ Power Button id=7 [slave keyboard (3)] ↳ MOSART Semi. Wireless Keyboard & Mouse id=8 [slave keyboard (3)] ↳ Eee PC WMI hotkeys id=12 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=13 [slave keyboard (3)]
Edit: Found the part of the answer: When you specify the layout for a device, you have to include all the layouts you want on all the hardware. So if I want russian on device 2 and US english on 3 then I need to use "ru,us" when specifiying the layout for device 2 and us,ru for device 3. Like this
setxkbmap -device 2 -layout ru,us setxkbmap -device 3 -layout us,ru
I still need to get this on startup and make a custom layout. Help with that would be much appreciated.