Debian Codegraph @

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