From ArchWiki
Revision as of 11:14, 15 September 2013 by Lahwaacz (Talk | contribs) (Configuring the console keymap: rm section - merged into Extra Keyboard Keys in Console)

Jump to: navigation, search


Introduction and basic configuration

The virtual console (keyboard mapping, console font, and console map) is configured in /etc/vconsole.conf. It defines what keymap the keyboard is in the virtual consoles. Keytable files are provided by the kbd package. An example /etc/vconsole.conf is shown below:

Note: As of systemd-194, the built-in kernel font and the us keymap are used if KEYMAP= and FONT= are empty or not set.

Another way to set the keyboard mapping (keymap) is using localectl:

# localectl set-keymap de

localectl can also be used to set the X11 keymap:

# localectl set-x11-keymap de

See man 1 localectl and man 5 vconsole.conf for details.

Keyboard layouts

This is the list of known keymap settings to work for the corresponding keyboard layouts. Most keymaps can be found in the /usr/share/kbd/keymaps/i386/layout (layout=qwerty, azerty, dvorak, etc.) directory.

Less common but nonetheless useful keymaps for Arch Linux are found in the /usr/share/kbd/keymaps/architecture (architecture=mac, sun, etc.) directory.

You can find more info about your keyboard layout with: less /usr/share/X11/xkb/rules/base.lst

  • In an X session, you can use setxkbmap to instantly apply keyboard layout: setxkbmap -layout dvorak
  • You can also use this method to modify single keys. This command would assign the compose functionality to the caps lock key: setxkbmap -option 'compose:caps'. This allows for example to write umlauts easily. Example for Umlaut A: CAPSLOCK, ", A -> Ä. You can also configure the right Windows key as a Compose key with setxkbmap -option 'compose:rwin'
  • If these keymaps do not work for you, make sure the keymap file exists in /usr/share/kbd/keymaps/ using find: find /usr/share/kbd/keymaps/ -name "*[your desired keymap]*"
  • You can see some instructions on how to use some keymaps in their respective files with: zless /usr/share/kbd/keymaps/.../.../
Keyboard Keymap setting
Armenian KEYMAP=am
Armenian (Eastern) KEYMAP=am -variant eastern
Belgian KEYMAP=be-latin1
Brazilian Portuguese KEYMAP=br-abnt2
Canadian-French KEYMAP=cf
Canadian Multilingual (in AUR) KEYMAP=ca_multi
Colemak (US) KEYMAP=colemak
Croatian KEYMAP=croat
Czech KEYMAP=cz-lat2
Danish KEYMAP=dk
Dvorak KEYMAP=dvorak
Finnish KEYMAP=fi-latin1
French KEYMAP=fr-latin1
Georgian KEYMAP=ge
German KEYMAP=de-latin1
German (no dead keys) KEYMAP=de-latin1-nodeadkeys
Greek KEYMAP=gr
Italian KEYMAP=it
Japanese KEYMAP=jp106
Lithuanian (qwerty) KEYMAP=lt.baltic
Norwegian KEYMAP=no-latin1
Polish KEYMAP=pl
Portuguese KEYMAP=pt-latin9
Romanian KEYMAP=ro_win
Russian KEYMAP=ru4
Singapore KEYMAP=sg-latin1
Slovene KEYMAP=slovene
Swedish KEYMAP=sv-latin1
Swiss-French KEYMAP=fr_CH-latin1
Swiss-German KEYMAP=de_CH-latin1
Spanish Spaniard KEYMAP=es
Spanish Latin American KEYMAP=la-latin1
Spanish Dvorak KEYMAP=dvorak-es
Turkish KEYMAP=tr_q-latin5
Ukrainian KEYMAP=ua
United Kingdom KEYMAP=uk