Difference between revisions of "KEYMAP"

From ArchWiki
Jump to: navigation, search
(United Kingdom keymap isn't "uk", it's "gb".)
(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)
(21 intermediate revisions by 16 users not shown)
Line 1: Line 1:
#REDIRECT [[Keyboard Configuration in Console]]
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.
{{Note|In an X session, you can use setxkbmap to instantly apply keyboard layout: {{Ic|setxkbmap -layout dvorak}}}}
{{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]*"}}}}
{| class="wikitable" border="1"
!  Keyboard
!  Keymap setting
|Brazilian Portuguese
|Canadian Multilingual (''in [[Arch User Repository|AUR]]'')
|Colemak ''(US)''
|German ''(no dead keys)''
|Lithuanian ''(qwerty)''
|Spanish Latinoamerican
|United Kingdom
==Configuring the Console Keymap==
#{{ic|cd}} to {{ic|/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