Difference between revisions of "KEYMAP"

From ArchWiki
Jump to: navigation, search
(United Kingdom keymap isn't "uk", it's "gb".)
m
(10 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 
[[Category:Internationalization]]
 
[[Category:Internationalization]]
 +
[[de:KEYMAP]]
 
[[es:KEYMAP]]
 
[[es:KEYMAP]]
 +
[[fr:KEYMAP]]
 +
[[ja:KEYMAP]]
 
[[pt:KEYMAP]]
 
[[pt:KEYMAP]]
 
[[tr:Klavye_düzeni]]
 
[[tr:Klavye_düzeni]]
Line 12: Line 15:
  
 
{{Note|In an X session, you can use setxkbmap to instantly apply keyboard layout: {{Ic|setxkbmap -layout dvorak}}}}
 
{{Note|In an X session, you can use setxkbmap to instantly apply keyboard layout: {{Ic|setxkbmap -layout dvorak}}}}
 +
 +
{{Note|You can also use this method to modify single keys. This command would assign the compose functionality to the caps lock key: {{ic|setxkbmap -option 'compose:caps'}}
 +
This allows for example to write umlauts easily. Example for Umlaut A: {{ic| CAPSLOCK, ", A}}  ->  Ä}}
  
 
{{Note|If these keymaps do not work for you, make sure the keymap file exists in {{ic|/usr/share/kbd/keymaps/}} using {{Ic|find}}: {{Ic|find /usr/share/kbd/keymaps/ -name "*[your desired keymap]*"}}}}
 
{{Note|If these keymaps do not work for you, make sure the keymap file exists in {{ic|/usr/share/kbd/keymaps/}} using {{Ic|find}}: {{Ic|find /usr/share/kbd/keymaps/ -name "*[your desired keymap]*"}}}}
 +
 +
{{Note|You can see some instructions on how to use some keymaps in their respective files with: {{Ic| zless /usr/share/kbd/keymaps/.../.../xx.map.gz}}}}
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 43: Line 51:
 
|Dvorak
 
|Dvorak
 
|{{Ic|KEYMAP<nowiki>=</nowiki>dvorak}}
 
|{{Ic|KEYMAP<nowiki>=</nowiki>dvorak}}
 +
|-
 +
|Finnish
 +
|{{Ic|KEYMAP<nowiki>=</nowiki>fi-latin1}}
 
|-
 
|-
 
|French
 
|French
Line 52: Line 63:
 
|German ''(no dead keys)''
 
|German ''(no dead keys)''
 
|{{Ic|KEYMAP<nowiki>=</nowiki>de-latin1-nodeadkeys}}
 
|{{Ic|KEYMAP<nowiki>=</nowiki>de-latin1-nodeadkeys}}
 +
|-
 +
|Greek
 +
|{{Ic|KEYMAP<nowiki>=</nowiki>gr}}
 
|-
 
|-
 
|Italian
 
|Italian
Line 91: Line 105:
 
|Spanish
 
|Spanish
 
|{{Ic|KEYMAP<nowiki>=</nowiki>es}}
 
|{{Ic|KEYMAP<nowiki>=</nowiki>es}}
 +
|-
 +
|Spanish Dvorak
 +
|{{Ic|KEYMAP<nowiki>=</nowiki>dvorak-es}}
 
|-
 
|-
 
|Spanish Latinoamerican
 
|Spanish Latinoamerican
Line 102: Line 119:
 
|-
 
|-
 
|United Kingdom
 
|United Kingdom
|{{Ic|KEYMAP<nowiki>=</nowiki>gb}}
+
|{{Ic|KEYMAP<nowiki>=</nowiki>uk}}
 
|}
 
|}
  

Revision as of 12:59, 17 February 2013

The KEYMAP variable is specified in the /etc/vconsole.conf file. It defines what keymap the keyboard is in the virtual consoles. Keytable files are provided by the kbd package.

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.

Note: In an X session, you can use setxkbmap to instantly apply keyboard layout: setxkbmap -layout dvorak
Note: 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 -> Ä
Note: 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]*"
Note: You can see some instructions on how to use some keymaps in their respective files with: zless /usr/share/kbd/keymaps/.../.../xx.map.gz
Keyboard Keymap setting
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
Dvorak KEYMAP=dvorak
Finnish KEYMAP=fi-latin1
French KEYMAP=fr-latin1
German KEYMAP=de-latin1
German (no dead keys) KEYMAP=de-latin1-nodeadkeys
Greek KEYMAP=gr
Italian KEYMAP=it
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 KEYMAP=es
Spanish Dvorak KEYMAP=dvorak-es
Spanish Latinoamerican KEYMAP=la-latin1
Turkish KEYMAP=tr_q-latin5
Ukrainian KEYMAP=ua
United Kingdom KEYMAP=uk

Configuring the Console Keymap

  1. cd to /usr/share/kbd/keymaps/i386/qwerty
  2. Copy your default keymap (us.map.gz) to a new file personal.map.gz
  3. gunzip the new map file
  4. Edit personal.map using your favorite editor. Examples:
    • Make the Right Alt key same as Left Alt key (Emacs)
      change the line include "linux-with-alt-and-altgr" to include "linux-with-two-alt-keys"
    • Swap CapsLock with Escape (Vim)
      make keycode 1 = Caps_Lock and keycode 58 = Escape
    • Make CapsLock another Control key
      change the line keycode 58 = Caps_Lock to keycode 58 = Control
    • Swap CapsLock with Left Control key
      make keycode 29 = Caps_Lock and keycode 58 = Control
  5. gzip the map file
  6. Change the default keyboard layout file that will be used by editing /etc/vconsole.conf (you might have to create this file) and changing the line that says KEYMAP=us to KEYMAP=personal
  7. Reboot to use your keymap the way nature intended (or run "loadkeys personal")