Debian Codegraph @

upstream/mageia-cauldron/man1/loadkeys.1

raw
1 .\" @(#)loadkeys.1
2 .TH LOADKEYS 1 "6 Feb 1994" "kbd"
3 .SH NAME
4 loadkeys \- load keyboard translation tables
5 .SH SYNOPSIS
6 .B loadkeys
7 [\fI\,OPTION\/\fR]... \fI\,FILENAME\/\fR...
8 .br
9 .B loadkeys
10 .I --default
11 .br
12 .B loadkeys
13 .I --mktable
14 .br
15 .B loadkeys
16 .I --bkeymap
17 .br
18 .B loadkeys
19 .IB --tkeymap "[=shape]"
20 .br
21 .B loadkeys
22 .I --parse
23 .LP
24 .SH DESCRIPTION
25 .IX "loadkeys command" "" "\fLloadkeys\fR command"
26 .LP
27 The program
28 .B loadkeys
29 reads the file or files specified by
30 .IR FILENAME... .
31 Its main purpose is to load the kernel keymap for the console.
32 You can specify console device by the
33 .I -C
34 (or
35 .I --console
36 ) option.
37 .SH "RESET TO DEFAULT"
38 If the
39 .I -d
40 (or
41 .I --default
42 ) option is given,
43 .B loadkeys
44 loads a default keymap, probably the file
45 .I defkeymap.map
46 either in
47 .I /usr/lib/kbd/keymaps
48 or in
49 .IR /usr/src/linux/drivers/tty/vt .
50 (Probably the former was user-defined, while the latter
51 is a qwerty keyboard map for PCs - maybe not what was desired.)
52 Sometimes, with a strange keymap loaded (with the minus on
53 some obscure unknown modifier combination) it is easier to
54 type `loadkeys defkeymap.map'.
55 .SH "LOAD KERNEL KEYMAP"
56 The main function of
57 .B loadkeys
58 is to load or modify the keyboard driver's translation tables.
59 When specifying the file names, standard input can be denoted
60 by dash (-). If no file is specified, the data is read from
61 the standard input.
62 .LP
63 For many countries and keyboard types appropriate keymaps
64 are available already, and a command like `loadkeys uk' might
65 do what you want. On the other hand, it is easy to construct
66 one's own keymap. The user has to tell what symbols belong
67 to each key. She can find the keycode for a key by use of
68 .BR showkey (1),
69 while the keymap format is given in
70 .BR keymaps (5)
71 and can also be seen from the output of
72 .BR dumpkeys (1).
73 .SH "LOAD KERNEL ACCENT TABLE"
74 If the input file does not contain any compose key definitions,
75 the kernel accent table is left unchanged, unless the
76 .I -c
77 (or
78 .I --clearcompose
79 ) option is given, in which case the kernel accent table is emptied.
80 If the input file does contain compose key definitions, then all
81 old definitions are removed, and replaced by the specified new entries.
82 The kernel accent table is a sequence of (by default 68) entries
83 describing how dead diacritical signs and compose keys behave.
84 For example, a line
85 .LP
86 .RS
87 compose ',' 'c' to ccedilla
88 .RE
89 .LP
90 means that <ComposeKey><,><c> must be combined to <ccedilla>.
91 The current content of this table can be see
92 using `dumpkeys \-\-compose\-only'.
93 .SH "LOAD KERNEL STRING TABLE"
94 The option
95 .I -s
96 (or
97 .I --clearstrings
98 ) clears the kernel string table. If this option is not given,
99 .B loadkeys
100 will only add or replace strings, not remove them.
101 (Thus, the option \-s is required to reach a well-defined state.)
102 The kernel string table is a sequence of strings
103 with names like F31. One can make function key F5 (on
104 an ordinary PC keyboard) produce the text `Hello!',
105 and Shift+F5 `Goodbye!' using lines
106 .LP
107 .RS
108 keycode 63 = F70 F71
109 .br
110 string F70 = "Hello!"
111 .br
112 string F71 = "Goodbye!"
113 .RE
114 .LP
115 in the keymap.
116 The default bindings for the function keys are certain
117 escape sequences mostly inspired by the VT100 terminal.
118 .SH "CREATE KERNEL SOURCE TABLE"
119 If the
120 .I -m
121 (or
122 .I --mktable
123 ) option is given
124 .B loadkeys
125 prints to the standard output a file that may be used as
126 .I /usr/src/linux/drivers/tty/vt/defkeymap.c,
127 specifying the default key bindings for a kernel
128 (and does not modify the current keymap).
129 .SH "CREATE BINARY KEYMAP"
130 If the
131 .I -b
132 (or
133 .I --bkeymap
134 ) option is given
135 .B loadkeys
136 prints to the standard output a file that may be used as a binary
137 keymap as expected by Busybox
138 .B loadkmap
139 command (and does not modify the current keymap).
140 .SH "CREATE TEXT KEYMAP"
141 If the
142 .I -t
143 (or
144 .I --tkeymap
145 ) option is given
146 .B loadkeys
147 prints to the standard output a file that may be used as a text
148 keymap as expected by
149 .B loadkeys
150 command (and does not modify the current keymap).
151 An optional argument can be used to select the shape of the output
152 format:
153 .IB "-t" shape
154 (or
155 .IB "--tkeymap=" shape
156 ).
157 .LP
158 Available shapes:
159 .LP
160 .RS
161 .B 2
162 default output.
163 .RE
164 .LP
165 .RS
166 .B 4
167 one line for each keycode.
168 .RE
169 .LP
170 .RS
171 .B 8
172 one line for each (modifier,keycode) pair.
173 .RE
174 .LP
175 .RS
176 .B 16
177 one line for each keycode until 1st hole.
178 .RE
179 .SH "UNICODE MODE"
180 .B loadkeys
181 automatically detects whether the console is in Unicode or
182 ASCII (XLATE) mode. When a keymap is loaded, literal
183 keysyms (such as
184 .BR section )
185 are resolved accordingly; numerical keysyms are converted to
186 fit the current console mode, regardless of the way they are
187 specified (decimal, octal, hexadecimal or Unicode).
188 .LP
189 The
190 .I -u
191 (or
192 .IR --unicode )
193 switch forces
194 .B loadkeys
195 to convert all keymaps to Unicode. If the keyboard is in a
196 non-Unicode mode, such as XLATE,
197 .B loadkeys
198 will change it to Unicode for the time of its execution. A
199 warning message will be printed in this case.
200 .LP
201 It is recommended to run
202 .BR kbd_mode (1)
203 before
204 .B loadkeys
205 instead of using the
206 .I -u
207 option.
208 .SH "OTHER OPTIONS"
209 .TP
210 .B \-a \-\-ascii
211 Force conversion to ASCII.
212 .TP
213 .B \-h \-\-help
214 .B loadkeys
215 prints its version number and a short usage message to the programs
216 standard error output and exits.
217 .TP
218 .B \-p \-\-parse
219 .B loadkeys
220 searches and parses keymap without action.
221 .TP
222 .B \-q \-\-quiet
223 .B loadkeys
224 suppresses all normal output.
225 .TP
226 .B \-V \-\-version
227 .B loadkeys
228 prints version number and exits.
229 .SH WARNING
230 Note that anyone having read access to
231 .B /dev/console
232 can run
233 .B loadkeys
234 and thus change the keyboard layout, possibly making it unusable. Note
235 that the keyboard translation table is common for all the virtual
236 consoles, so any changes to the keyboard bindings affect all the virtual
237 consoles simultaneously.
238 .LP
239 Note that because the changes affect all the virtual consoles, they also
240 outlive your session. This means that even at the login prompt the key
241 bindings may not be what the user expects.
242 .SH FILES
243 .TP
244 .I /usr/lib/kbd/keymaps
245 default directory for keymaps.
246 .LP
247 .TP
248 .I /usr/src/linux/drivers/tty/vt/defkeymap.map
249 default kernel keymap.
250 .LP
251 .SH "SEE ALSO"
252 .BR dumpkeys (1),
253 .BR keymaps (5)
254