My laptop has a US built-in keyboard and I am also connecting a good old Cherry keyboard with German key layout via a PS/2-to-USB adapter. Is there a way to install different keymaps used in the Linux text console for the different devices simultaneously?

  • It's been a while I've done this, but back in the day, I had 2 keyboards, french, and english, never got them to work together like you'd like but, when one is plugged in, I'd replace it by the other. bbs.archlinux.org/viewtopic.php?id=84163 wiki.archlinux.org/index.php/xmodmap – kmassada Apr 11 '14 at 18:06
  • Which text consoles? There are like 5!! Console, TTY, Terminal, Shell, etc. superuser.com/q/144666/235569 – Braiam Apr 16 '14 at 1:19
  • As far as I can tell, the keyboard layout is set using loadkeys, and is associated with the virtual console, rather than the keyboards. Otherwise you would use udev to make any changes when the USB device is detected as being inserted / added as a device. I hate to say it, but I don't see a way to do i – Slartibartfast Apr 16 '14 at 3:21

You have to find the ID device:

xinput -list | grep -i key

and using such ID set the layout:

setxkbmap -device ID -layout layout

  • Right, that's for X11. I am looking for the corresponding procedure for the text-console. – Tilman Vogel May 25 '12 at 20:39
  • 1
    Reason for downvote: answers another question. – Darael Apr 11 '14 at 13:14

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.