source: chapter06/kbd.xml@ 4818ca8

7.5-systemd 7.6-systemd 7.7-systemd 7.8-systemd 7.9-systemd
Last change on this file since 4818ca8 was 4818ca8, checked in by Matthew Burgess <matthew@…>, 11 years ago

Merge latest changes from trunk to systemd branch

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd/BOOK@10191 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

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