0

I am running Ubuntu on a Thinkpad laptop with an external keyboard linked up. The laptop keyboard has a GB layout and the external has a US layout.

First, I output a list of the connected devices (I've removed some irrelevant devices)

➜  xinput -list 
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Synaptics TM3053-004                      id=20   [slave  pointer  (2)]
⎜   ↳ TPPS/2 IBM TrackPoint                     id=21   [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)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Sleep Button                              id=8    [slave  keyboard (3)]
    ↳ Integrated Camera: Integrated C           id=9    [slave  keyboard (3)]
    ↳ DasKeyboard                               id=12   [slave  keyboard (3)]
    ↳ DasKeyboard                               id=13   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=18   [slave  keyboard (3)]
    ↳ ThinkPad Extra Buttons                    id=19   [slave  keyboard (3)]

So the laptop appears on device ID 18 and the keyboard on device ID 12 and 13. Here is the query showing both keyboards are set to GB:

➜  setxkbmap -device 12 -query                                     
rules:      evdev
model:      pc105
layout:     gb,gb
variant:    ,
➜  setxkbmap -device 18 -query
rules:      evdev
model:      pc105
layout:     gb,gb
variant:    ,

I now set the layout on device ID 12:

➜  setxkbmap -device 12 -layout us   

but you see that this sets it also for device 18.

➜  setxkbmap -device 12 -query                                     
rules:      evdev
model:      pc105
layout:     us
➜  setxkbmap -device 18 -query    
rules:      evdev
model:      pc105
layout:     us

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.