Debian Codegraph @

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