1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
]>
<sect1 id="ch-system-kbd" role="wrap">
<?dbhtml filename="kbd.html"?>
<sect1info condition="script">
<productname>kbd</productname>
<productnumber>&kbd-version;</productnumber>
<address>&kbd-url;</address>
</sect1info>
<title>Kbd-&kbd-version;</title>
<indexterm zone="ch-system-kbd">
<primary sortas="a-Kbd">Kbd</primary>
</indexterm>
<sect2 role="package">
<title/>
<para>The Kbd package contains key-table files, console fonts, and keyboard
utilities.</para>
<segmentedlist>
<segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<seglistitem>
<seg>&kbd-ch6-sbu;</seg>
<seg>&kbd-ch6-du;</seg>
</seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Kbd</title>
<para>The behaviour of the Backspace and Delete keys is not consistent
across the keymaps in the Kbd package. The following patch fixes this
issue for i386 keymaps:</para>
<screen><userinput remap="pre">patch -Np1 -i ../&kbd-backspace-patch;</userinput></screen>
<para>After patching, the Backspace key generates the character with code 127,
and the Delete key generates a well-known escape sequence.</para>
<para>Fix a bug that causes some keymaps not to be loaded correctly:</para>
<screen><userinput remap="pre">sed -i -e '326 s/if/while/' src/loadkeys.analyze.l</userinput></screen>
<para>Prepare Kbd for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr --datadir=/lib/kbd \
--disable-vlock</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>
<varlistentry>
<term><parameter>--datadir=/lib/kbd</parameter></term>
<listitem>
<para>This option puts keyboard layout data in a directory that will
always be on the root partition instead of the default <filename
class="directory">/usr/share/kbd</filename>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--disable-vlock</parameter></term>
<listitem>
<para>This option prevents the vlock utility from being built, as it
requires the PAM library, which isn't available in the chroot
environment.</para>
</listitem>
</varlistentry>
</variablelist>
<para>Compile the package:</para>
<screen><userinput remap="make">make</userinput></screen>
<para>This package does not come with a test suite.</para>
<para>Install the package:</para>
<screen><userinput remap="install">make install</userinput></screen>
<note>
<para>For some languages (e.g., Belarusian) the Kbd package doesn't
provide a useful keymap where the stock <quote>by</quote> keymap assumes
the ISO-8859-5 encoding, and the CP1251 keymap is normally used. Users of
such languages have to download working keymaps separately.</para>
</note>
<para>Some of the scripts in the LFS-Bootscripts package depend on
<command>kbd_mode</command>, <command>loadkeys</command>,
<command>openvt</command>, and
<command>setfont</command>. As <filename class="directory">/usr</filename>
may not be available during the early stages of booting, those binaries
need to be on the root partition:</para>
<screen><userinput remap="install">mv -v /usr/bin/{kbd_mode,loadkeys,openvt,setfont} /bin</userinput></screen>
<para>If desired, install the documentation:</para>
<screen><userinput remap="install">mkdir -v /usr/share/doc/kbd-&kbd-version;
cp -R -v doc/* \
/usr/share/doc/kbd-&kbd-version;</userinput></screen>
</sect2>
<sect2 id="contents-kbd" role="content">
<title>Contents of Kbd</title>
<segmentedlist>
<segtitle>Installed programs</segtitle>
<segtitle>Installed directory</segtitle>
<seglistitem>
<seg>chvt, deallocvt, dumpkeys, fgconsole, getkeycodes, kbdinfo,
kbd_mode, kbdrate, loadkeys, loadunimap,
mapscrn, openvt, psfaddtable (link to psfxtable), psfgettable (link to
psfxtable), psfstriptable (link to psfxtable), psfxtable, <!--resizecons,-->
setfont, setkeycodes, setleds, setmetamode,
showconsolefont, showkey, unicode_start, and unicode_stop</seg>
<seg>/lib/kbd</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="chvt">
<term><command>chvt</command></term>
<listitem>
<para>Changes the foreground virtual terminal</para>
<indexterm zone="ch-system-kbd chvt">
<primary sortas="b-chvt">chvt</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="deallocvt">
<term><command>deallocvt</command></term>
<listitem>
<para>Deallocates unused virtual terminals</para>
<indexterm zone="ch-system-kbd deallocvt">
<primary sortas="b-deallocvt">deallocvt</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="dumpkeys">
<term><command>dumpkeys</command></term>
<listitem>
<para>Dumps the keyboard translation tables</para>
<indexterm zone="ch-system-kbd dumpkeys">
<primary sortas="b-dumpkeys">dumpkeys</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="fgconsole">
<term><command>fgconsole</command></term>
<listitem>
<para>Prints the number of the active virtual terminal</para>
<indexterm zone="ch-system-kbd fgconsole">
<primary sortas="b-fgconsole">fgconsole</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="getkeycodes">
<term><command>getkeycodes</command></term>
<listitem>
<para>Prints the kernel scancode-to-keycode mapping table</para>
<indexterm zone="ch-system-kbd getkeycodes">
<primary sortas="b-getkeycodes">getkeycodes</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="kbdinfo">
<term><command>kbdinfo</command></term>
<listitem>
<para>Obtains information about the status of a console</para>
<indexterm zone="ch-system-kbd kbdinfo">
<primary sortas="b-kbdinfo">kbdinfo</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="kbd_mode">
<term><command>kbd_mode</command></term>
<listitem>
<para>Reports or sets the keyboard mode</para>
<indexterm zone="ch-system-kbd kbd_mode">
<primary sortas="b-kbd_mode">kbd_mode</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="kbdrate">
<term><command>kbdrate</command></term>
<listitem>
<para>Sets the keyboard repeat and delay rates</para>
<indexterm zone="ch-system-kbd kbdrate">
<primary sortas="b-kbdrate">kbdrate</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="loadkeys">
<term><command>loadkeys</command></term>
<listitem>
<para>Loads the keyboard translation tables</para>
<indexterm zone="ch-system-kbd loadkeys">
<primary sortas="b-loadkeys">loadkeys</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="loadunimap">
<term><command>loadunimap</command></term>
<listitem>
<para>Loads the kernel unicode-to-font mapping table</para>
<indexterm zone="ch-system-kbd loadunimap">
<primary sortas="b-loadunimap">loadunimap</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="mapscrn">
<term><command>mapscrn</command></term>
<listitem>
<para>An obsolete program that used to load a user-defined output
character mapping table into the console driver; this is now done
by <command>setfont</command></para>
<indexterm zone="ch-system-kbd mapscrn">
<primary sortas="b-mapscrn">mapscrn</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="openvt">
<term><command>openvt</command></term>
<listitem>
<para>Starts a program on a new virtual terminal (VT)</para>
<indexterm zone="ch-system-kbd openvt">
<primary sortas="b-openvt">openvt</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="psfaddtable">
<term><command>psfaddtable</command></term>
<listitem>
<para>A link to <command>psfxtable</command></para>
<indexterm zone="ch-system-kbd psfaddtable">
<primary sortas="b-psfaddtable">psfaddtable</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="psfgettable">
<term><command>psfgettable</command></term>
<listitem>
<para>A link to <command>psfxtable</command></para>
<indexterm zone="ch-system-kbd psfgettable">
<primary sortas="b-psfgettable">psfgettable</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="psfstriptable">
<term><command>psfstriptable</command></term>
<listitem>
<para>A link to <command>psfxtable</command></para>
<indexterm zone="ch-system-kbd psfstriptable">
<primary sortas="b-psfstriptable">psfstriptable</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="psfxtable">
<term><command>psfxtable</command></term>
<listitem>
<para>Handle Unicode character tables for console fonts</para>
<indexterm zone="ch-system-kbd psfxtable">
<primary sortas="b-psfxtable">psfxtable</primary>
</indexterm>
</listitem>
</varlistentry>
<!--<varlistentry id="resizecons">
<term><command>resizecons</command></term>
<listitem>
<para>Changes the kernel idea of the console size</para>
<indexterm zone="ch-system-kbd resizecons">
<primary sortas="b-resizecons">resizecons</primary>
</indexterm>
</listitem>
</varlistentry>-->
<varlistentry id="setfont">
<term><command>setfont</command></term>
<listitem>
<para>Changes the Enhanced Graphic Adapter (EGA) and Video Graphics
Array (VGA) fonts on the console</para>
<indexterm zone="ch-system-kbd setfont">
<primary sortas="b-setfont">setfont</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="setkeycodes">
<term><command>setkeycodes</command></term>
<listitem>
<para>Loads kernel scancode-to-keycode mapping table entries; this is
useful if there are unusual keys on the keyboard</para>
<indexterm zone="ch-system-kbd setkeycodes">
<primary sortas="b-setkeycodes">setkeycodes</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="setleds">
<term><command>setleds</command></term>
<listitem>
<para>Sets the keyboard flags and Light Emitting Diodes (LEDs)</para>
<indexterm zone="ch-system-kbd setleds">
<primary sortas="b-setleds">setleds</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="setmetamode">
<term><command>setmetamode</command></term>
<listitem>
<para>Defines the keyboard meta-key handling</para>
<indexterm zone="ch-system-kbd setmetamode">
<primary sortas="b-setmetamode">setmetamode</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="showconsolefont">
<term><command>showconsolefont</command></term>
<listitem>
<para>Shows the current EGA/VGA console screen font</para>
<indexterm zone="ch-system-kbd showconsolefont">
<primary sortas="b-showconsolefont">showconsolefont</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="showkey">
<term><command>showkey</command></term>
<listitem>
<para>Reports the scancodes, keycodes, and ASCII codes of the keys
pressed on the keyboard</para>
<indexterm zone="ch-system-kbd showkey">
<primary sortas="b-showkey">showkey</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="unicode_start">
<term><command>unicode_start</command></term>
<listitem>
<para>Puts the keyboard and console in UNICODE mode. Don't use this
program unless your keymap file is in the ISO-8859-1 encoding. For
other encodings, this utility produces incorrect results.</para>
<indexterm zone="ch-system-kbd unicode_start">
<primary sortas="b-unicode_start">unicode_start</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="unicode_stop">
<term><command>unicode_stop</command></term>
<listitem>
<para>Reverts keyboard and console from UNICODE mode</para>
<indexterm zone="ch-system-kbd unicode_stop">
<primary sortas="b-unicode_stop">unicode_stop</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>
|