Difference between revisions of "KEYMAP"
m (Bot: Removing from Category:HOWTOs (English)) |
(→Keyboard layouts) |
||
(41 intermediate revisions by 28 users not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:Internationalization | + | [[Category:Internationalization]] |
− | + | [[de:KEYMAP]] | |
− | The '''KEYMAP''' variable is specified in the {{ | + | [[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== | ==Keyboard layouts== | ||
− | This is the list of known keymap settings to work for the corresponding 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. |
− | Most keymaps can be found in the {{ | ||
− | Less common but nonetheless useful keymaps | + | 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}}}} | |
− | + | ||
− | + | {{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}} -> Ä. You can also configure the right Windows key as a Compose key with {{ic|setxkbmap -option 'compose:rwin'}}}} | |
− | + | ||
− | + | {{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" | |
− | < | + | |- |
− | + | ! 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 [[Arch User Repository|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}} 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 16:41, 26 March 2013
zh-CN:KEYMAP
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.
You can find more info about your keyboard layout with:
less /usr/share/X11/xkb/rules/base.lst
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
-> Ä. You can also configure the right Windows key as a Compose key with setxkbmap -option 'compose:rwin'
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 |
---|---|
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
|
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
|
Configuring the Console Keymap
cd
to/usr/share/kbd/keymaps/i386/qwerty
- Copy your default keymap (
us.map.gz
) to a new filepersonal.map.gz
gunzip
the new map file- Edit
personal.map
using your favorite editor. Examples:- Make the Right Alt key same as Left Alt key (Emacs)
change the lineinclude "linux-with-alt-and-altgr"
toinclude "linux-with-two-alt-keys"
- Swap CapsLock with Escape (Vim)
makekeycode 1 = Caps_Lock
andkeycode 58 = Escape
- Make CapsLock another Control key
change the linekeycode 58 = Caps_Lock
tokeycode 58 = Control
- Swap CapsLock with Left Control key
makekeycode 29 = Caps_Lock
andkeycode 58 = Control
- Make the Right Alt key same as Left Alt key (Emacs)
gzip
the map file- 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 saysKEYMAP=us
toKEYMAP=personal
- Reboot to use your keymap the way nature intended (or run "loadkeys personal")