Linux – How to Remap Keyboard on the Console

consolekeyboard-layoutlinux

I'm using Debian and I want to remap my keyboard because it has some problem. I googled and found xmodmap. But it doesn't work in graphicless mode, like tty1.

Best Answer

Linux uses two independent keyboard mappings. One for the graphical mode X and one for the console.

You usually change the first one with setxkbmap (or xmodmap) and the second one with loadkeys. All those tool have a fine manpage.

For loadkeys you can find the existing keymaps under /usr/share/kbd/keymaps. The description of those files is available in man 5 keymaps.

Related Question