1KEYBOARD(5) Console-setup User's Manual KEYBOARD(5)
2
3
4
6 keyboard - keyboard configuration file
7
9 The keyboard file describes the properties of the keyboard. It is read
10 by setupcon(1) in order to configure the keyboard on the console. In
11 Debian systems the default keyboard layout is described in
12 /etc/default/keyboard and it is shared between X and the console.
13
14 The specification of the keyboard layout in the keyboard file is based
15 on the XKB options XkbModel, XkbLayout, XkbVariant and XkbOptions.
16 Unfortunately, there is little documentation how to use them. Descrip‐
17 tion of all possible values for these options can be found in the file
18 xorg.lst.
19
20 You might want to read “The XKB Configuration Guide” by Kamil Toman and
21 Ivan U. Pascal:
22
23 http://www.xfree86.org/current/XKB-Config.html
24
25 Other possible readings are:
26
27 https://wiki.archlinux.org/index.php/X_KeyBoard_extension
28 http://pascal.tsu.ru/en/xkb/
29 http://www.charvolant.org/~doug/xkb/
30
31 The complete XKB-specification can be found on
32
33 http://xfree86.org/current/XKBproto.pdf
34
35 The file keyboard consists of variable settings in POSIX format:
36
37 VARIABLE=VALUE
38
39 Only one assignment is allowed per line. Comments (starting with '#')
40 are also allowed.
41
42
44 The following variables can be set.
45
46
47 XKBMODEL
48 Specifies the XKB keyboard model name. Default: pc105 for most
49 platforms.
50
51
52 XKBLAYOUT
53 Specifies the XKB keyboard layout name. This is usually the
54 country or language type of the keyboard. Default: us for most
55 platforms
56
57
58 XKBVARIANT
59 Specifies the XKB keyboard variant components. These can be used
60 to further specify the keyboard layout details. Default: not
61 set.
62
63
64 XKBOPTIONS
65 Specifies the XKB keyboard option components. Options usually
66 relate to the behavior of the special keys (<Shift>, <Control>,
67 <Alt>, <CapsLock>, etc.) Default: not set.
68
69
70 BACKSPACE
71 Determines the behavior of <BackSpace> and <Delete> keys on the
72 console. Allowed values: bs, del and guess. In most cases you
73 can specify guess here, in which case the current terminal set‐
74 tings and the kernel of your operating system will be used to
75 determine the correct value. Value bs specifies VT100-confor‐
76 mant behavior: <BackSpace> will generate ^H (ASCII BS) and
77 <Delete> will generate ^? (ASCII DEL). Value del specifies
78 VT220-conformant behavior: <BackSpace> will generate ^? (ASCII
79 DEL) and <Delete> will generate a special function sequence.
80
81
82 KMAP Usually this variable will be unset but if you don't want to use
83 a XKB layout on the console, you can specify an alternative
84 keymap here. Specify a file that is suitable as input for load‐
85 keys(1) on Linux or for kbdcontrol(1) on FreeBSD.
86
87
89 The standard location of the keyboard file is /etc/default/keyboard.
90 Description of all available keyboard models, layouts, variants and op‐
91 tions is available in /usr/share/X11/xkb/rules/xorg.lst. In most cas‐
92 es, in /lib/kbd/keymaps/ you will find several keymaps that can be used
93 with the variable KMAP.
94
95
97 In Debian systems, changes in /etc/default/keyboard do not become imme‐
98 diately visible to X. You should either reboot the system, or use
99
100 udevadm trigger --subsystem-match=input --action=change
101
102
104 When a triple-layout is used, i.e. a layout with three XKB groups, then
105 the group toggling happens in the following way: Group1 -> Group2 ->
106 Group1 -> Group3.
107
108 On FreeBSD triple- and quadruple-layouts are not supported (only the
109 first and the second layout are taken into account).
110
111 The option grp:shifts_toggle is not supported.
112
113
115 The following configuration will give you the standard US QWERTY layout
116 (us). The key <Menu> will act as a compose key (compose:menu) and
117 <CapsLock> will act as third control key (ctrl:nocaps).
118
119 XKBLAYOUT=us
120 XKBVARIANT=
121 XKBOPTIONS=compose:menu,ctrl:nocaps
122
123 In the following configuration the right <Alt> key (grp:toggle) will
124 toggle between US QWERTY layout (us) and Greek (gr) layout. The option
125 grp_led:scroll is ignored on the console but in X in means to use the
126 ScrollLock keyboard led as indicator for the current layout (US or
127 Greek).
128
129 XKBLAYOUT=us,gr
130 XKBVARIANT=
131 XKBOPTIONS=grp:toggle,grp_led:scroll
132
133 In the following configuration the <Control>+<Shift> key combination
134 will toggle (grp:ctrl_shift_toggle) between French keyboard (fr) with‐
135 out dead keys (nodeadkeys) and British (gb) “Dvorak” (dvorak) keyboard.
136 The right <Win> key will be a compose-key (compose:rwin) and the right
137 <Alt> key will function as AltGr (lv3:lalt_switch).
138
139 XKBLAYOUT=fr,gb
140 XKBVARIANT=nodeadkeys,dvorak
141 XKBOPTIONS=grp:ctrl_shift_toggle,compose:rwin,lv3:ralt_switch
142
143
145 setupcon(1), ckbcomp(1), console-setup(5), loadkeys(1), kbdcontrol(1)
146
147
148
149console-setup 2011-03-17 KEYBOARD(5)