Difference between revisions of "KEYMAP"

From ArchWiki
Jump to: navigation, search
m (Style)
(everything is covered in Keyboard Configuration in Console and Keyboard Configuration in Xorg, redirect to the former because KEYMAP is used to configure console keymap)
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Internationalization]]
+
#REDIRECT [[Keyboard Configuration in Console]]
[[de:KEYMAP]]
+
[[es:KEYMAP]]
+
[[fr:KEYMAP]]
+
[[ja:KEYMAP]]
+
[[pt:KEYMAP]]
+
[[tr:Klavye_düzeni]]
+
[[zh-CN:KEYMAP]]
+
The '''KEYMAP''' variable is specified in the [[Systemd#Console_and_keymap|{{ic|/etc/vconsole.conf}}]] file. It defines what keymap the keyboard is in the virtual consoles. Keytable files are provided by the {{Pkg|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 {{ic|/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 {{ic|/usr/share/kbd/keymaps/''architecture''}} (''architecture''=mac, sun, etc.) directory.
+
 
+
You can find more info about your keyboard layout with:
+
{{ic|less /usr/share/X11/xkb/rules/base.lst}}
+
 
+
{{Note|
+
* In an X session, you can use setxkbmap to instantly apply keyboard layout: {{ic|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: {{ic|setxkbmap -option 'compose:caps'}}. This allows for example to write umlauts easily. Example for Umlaut A: {{ic| CAPSLOCK, ", A}}  ->  Ä. You can also configure the right Windows key as a Compose key with {{ic|setxkbmap -option 'compose:rwin'}}
+
* 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]*"}}
+
* 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"
+
|-
+
!  Keyboard
+
!  Keymap setting
+
|-
+
|-
+
|Armenian
+
|{{ic|KEYMAP<nowiki>=</nowiki>am}}
+
|-
+
|Armenian (Eastern)
+
|{{ic|KEYMAP<nowiki>=</nowiki>am -variant eastern}}
+
|-
+
|Belgian
+
|{{ic|KEYMAP<nowiki>=</nowiki>be-latin1}}
+
|-
+
|Brazilian Portuguese
+
|{{ic|KEYMAP<nowiki>=</nowiki>br-abnt2}}
+
|-
+
|Canadian-French
+
|{{ic|KEYMAP<nowiki>=</nowiki>cf}}
+
|-
+
|Canadian Multilingual (''in [[AUR]]'')
+
|{{ic|KEYMAP<nowiki>=</nowiki>ca_multi}}
+
|-
+
|Colemak ''(US)''
+
|{{ic|KEYMAP<nowiki>=</nowiki>colemak}}
+
|-
+
|Croatian
+
|{{ic|KEYMAP<nowiki>=</nowiki>croat}}
+
|-
+
|Czech
+
|{{ic|KEYMAP<nowiki>=</nowiki>cz-lat2}}
+
|-
+
|Danish
+
|{{ic|KEYMAP<nowiki>=</nowiki>dk}}
+
|-
+
|Dvorak
+
|{{ic|KEYMAP<nowiki>=</nowiki>dvorak}}
+
|-
+
|Finnish
+
|{{ic|KEYMAP<nowiki>=</nowiki>fi-latin1}}
+
|-
+
|French
+
|{{ic|KEYMAP<nowiki>=</nowiki>fr-latin1}}
+
|-
+
|Georgian
+
|{{ic|KEYMAP<nowiki>=</nowiki>ge}}
+
|-
+
|German
+
|{{ic|KEYMAP<nowiki>=</nowiki>de-latin1}}
+
|-
+
|German ''(no dead keys)''
+
|{{ic|KEYMAP<nowiki>=</nowiki>de-latin1-nodeadkeys}}
+
|-
+
|Greek
+
|{{ic|KEYMAP<nowiki>=</nowiki>gr}}
+
|-
+
|Italian
+
|{{ic|KEYMAP<nowiki>=</nowiki>it}}
+
|-
+
|Lithuanian ''(qwerty)''
+
|{{ic|KEYMAP<nowiki>=</nowiki>lt.baltic}}
+
|-
+
|Norwegian
+
|{{ic|KEYMAP<nowiki>=</nowiki>no-latin1}}
+
|-
+
|Polish
+
|{{ic|KEYMAP<nowiki>=</nowiki>pl}}
+
|-
+
|Portuguese
+
|{{ic|KEYMAP<nowiki>=</nowiki>pt-latin9}}
+
|-
+
|Romanian
+
|{{ic|KEYMAP<nowiki>=</nowiki>ro_win}}
+
|-
+
|Russian
+
|{{ic|KEYMAP<nowiki>=</nowiki>ru4}}
+
|-
+
|Singapore
+
|{{ic|KEYMAP<nowiki>=</nowiki>sg-latin1}}
+
|-
+
|Slovene
+
|{{ic|KEYMAP<nowiki>=</nowiki>slovene}}
+
|-
+
|Swedish
+
|{{ic|KEYMAP<nowiki>=</nowiki>sv-latin1}}
+
|-
+
|Swiss-French
+
|{{ic|KEYMAP<nowiki>=</nowiki>fr_CH-latin1}}
+
|-
+
|Swiss-German
+
|{{ic|KEYMAP<nowiki>=</nowiki>de_CH-latin1}}
+
|-
+
|Spanish Spaniard
+
|{{ic|KEYMAP<nowiki>=</nowiki>es}}
+
|-
+
|Spanish Latin American
+
|{{ic|KEYMAP<nowiki>=</nowiki>la-latin1}}
+
|-
+
|Spanish Dvorak
+
|{{ic|KEYMAP<nowiki>=</nowiki>dvorak-es}}
+
|-
+
|Turkish
+
|{{ic|KEYMAP<nowiki>=</nowiki>tr_q-latin5}}
+
|-
+
|Ukrainian
+
|{{ic|KEYMAP<nowiki>=</nowiki>ua}}
+
|-
+
|United Kingdom
+
|{{ic|KEYMAP<nowiki>=</nowiki>uk}}
+
|}
+
 
+
== Configuring the console keymap ==
+
 
+
# {{ic|cd /usr/share/kbd/keymaps/i386/qwerty}}.
+
# Copy your default keymap ({{ic|us.map.gz}}) to a new file {{ic|personal.map.gz}}.
+
# {{ic|gunzip}} the new map file.
+
# Edit {{ic|personal.map}} using your favorite editor. Examples:
+
#* '''Make the Right Alt key same as Left Alt key (Emacs)'''<br>change the line {{ic|include "linux-with-alt-and-altgr"}} to {{ic|include "linux-with-two-alt-keys"}}.
+
#* '''Swap CapsLock with Escape (Vim)'''<br>make {{ic|keycode 1 <nowiki>=</nowiki> Caps_Lock}} and {{ic|keycode 58 <nowiki>=</nowiki> Escape}}.
+
#* '''Make CapsLock another Control key'''<br>change the line {{ic|keycode 58 <nowiki>=</nowiki> Caps_Lock}} to {{ic|keycode 58 <nowiki>=</nowiki> Control}}.
+
#* '''Swap CapsLock with Left Control key'''<br>make {{ic|keycode 29 <nowiki>=</nowiki> Caps_Lock}} and {{ic|keycode 58 <nowiki>=</nowiki> Control}}.
+
# {{ic|gzip}} the map file.
+
# Change the default keyboard layout file that will be used by editing {{ic|/etc/vconsole.conf}} (you might have to create this file) and changing the line that says {{ic|KEYMAP<nowiki>=</nowiki>us}} to {{ic|KEYMAP<nowiki>=</nowiki>personal}}.
+
# Reboot to use your keymap the way nature intended (or run "loadkeys personal").
+

Revision as of 11:17, 15 September 2013