Linux Keyboard Settings
Change Layout
Changing your keyboard layout is different depending on whether you are at the console or in a window manager (X).
Window Manager
To change keyboard layouts there is usually an option in your window manager's preferences. If you don't have such a window manager then it can be specified on the command line with the setxkbmap command:
setxkbmap dvorak
Your choices are what you put for the XkbLayout option in xorg.conf file:
Option "XkbLayout" "dvorak, us"
(My /etc/X11/xorg.conf looks like this +)
[le:_inc Couldn't open file for inclusion: /usr/local/vhosts/solairis.com/static/projects/notes/linux/xorg.conf. reason: No such file or directory]
It is noteworthy that setxkbmap will mess up any xmodmap stuff that you've done. Just rerun it after you use setxkbmap
To use Ctrl+Shift to change your keyboard layout, like in Windows, use XkbOptions in your xorg.conf file:
Option "XkbOptions" "grp:ctrl_shift_toggle"
Console
To change the keyboard layout at the console use loadkeys to specify a map file where a map file exists in /usr/share/keymaps/i386/*/*.map.gz:
loadkeys dvorak # loads the dvorak keyboard loadkeys us # loads the US qwerty keyboard loadkeys -d # loads your system's default keyboard
Your system's default keymap is specified at startup by the KEYMAP variable. In Gentoo this is set in /etc/conf.d/keymaps. For other systems I recommend grep -RI 'KEYMAP.*=' /etc/* 2>/dev/null.