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">
8 <sect1 id="ch-system-kbd" role="wrap">
9 <?dbhtml filename="kbd.html"?>
11 <sect1info condition="script">
12 <productname>kbd</productname>
13 <productnumber>&kbd-version;</productnumber>
14 <address>&kbd-url;</address>
17 <title>Kbd-&kbd-version;</title>
19 <indexterm zone="ch-system-kbd">
20 <primary sortas="a-Kbd">Kbd</primary>
23 <sect2 role="package">
26 <para>The Kbd package contains key-table files, console fonts, and keyboard
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
34 <seg>&kbd-ch6-sbu;</seg>
35 <seg>&kbd-ch6-du;</seg>
41 <sect2 role="installation">
42 <title>Installation of Kbd</title>
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>
48 <screen><userinput remap="pre">patch -Np1 -i ../&kbd-backspace-patch;</userinput></screen>
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>
53 <para>Remove the redundant <command>resizecons</command> program (it requires
54 the defunct svgalib to provide the video mode files - for normal use
55 <command>setfont</command> sizes the console appropriately) together with its
58 <screen><userinput remap="pre">sed -i 's/\(RESIZECONS_PROGS=\)yes/\1no/g' configure
59 sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in</userinput></screen>
61 <para>Prepare Kbd for compilation:</para>
63 <screen><userinput remap="configure">PKG_CONFIG_PATH=/tools/lib/pkgconfig ./configure --prefix=/usr --disable-vlock</userinput></screen>
66 <title>The meaning of the configure options:</title>
69 <term><parameter>- -datadir=/lib/kbd</parameter></term>
71 <para>This option puts keyboard layout data in a directory that will
72 always be on the root partition instead of the default <filename
73 class="directory">/usr/share/kbd</filename>.</para>
78 <term><parameter>--disable-vlock</parameter></term>
80 <para>This option prevents the vlock utility from being built, as it
81 requires the PAM library, which isn't available in the chroot
88 <para>Compile the package:</para>
90 <screen><userinput remap="make">make</userinput></screen>
92 <para>To test the results, issue:</para>
94 <screen><userinput remap="test">make check</userinput></screen>
96 <para>Install the package:</para>
98 <screen><userinput remap="install">make install</userinput></screen>
101 <para>For some languages (e.g., Belarusian) the Kbd package doesn't
102 provide a useful keymap where the stock <quote>by</quote> keymap assumes
103 the ISO-8859-5 encoding, and the CP1251 keymap is normally used. Users of
104 such languages have to download working keymaps separately.</para>
108 <para>Some of the scripts in the LFS-Bootscripts package depend on
109 <command>kbd_mode</command>, <command>loadkeys</command>,
110 <command>openvt</command>, and
111 <command>setfont</command>. As <filename class="directory">/usr</filename>
112 may not be available during the early stages of booting, those binaries
113 need to be on the root partition:</para>
115 <screen><userinput remap="install">mv -v /usr/bin/{kbd_mode,loadkeys,openvt,setfont} /bin</userinput></screen>
117 <para>If desired, install the documentation:</para>
119 <screen><userinput remap="install">mkdir -v /usr/share/doc/kbd-&kbd-version;
120 cp -R -v docs/doc/* /usr/share/doc/kbd-&kbd-version;</userinput></screen>
124 <sect2 id="contents-kbd" role="content">
125 <title>Contents of Kbd</title>
128 <segtitle>Installed programs</segtitle>
129 <segtitle>Installed directories</segtitle>
132 <seg>chvt, deallocvt, dumpkeys, fgconsole, getkeycodes, kbdinfo,
133 kbd_mode, kbdrate, loadkeys, loadunimap,
134 mapscrn, openvt, psfaddtable (link to psfxtable), psfgettable (link to
135 psfxtable), psfstriptable (link to psfxtable), psfxtable, <!--resizecons,-->
136 setfont, setkeycodes, setleds, setmetamode, setvtrgb,
137 showconsolefont, showkey, unicode_start, and unicode_stop</seg>
138 <seg>/usr/share/consolefonts, /usr/share/consoletrans, /usr/share/keymaps,
139 /usr/share/doc/kbd-&kbd-version;, and /usr/share/unimaps</seg>
144 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
145 <?dbfo list-presentation="list"?>
146 <?dbhtml list-presentation="table"?>
148 <varlistentry id="chvt">
149 <term><command>chvt</command></term>
151 <para>Changes the foreground virtual terminal</para>
152 <indexterm zone="ch-system-kbd chvt">
153 <primary sortas="b-chvt">chvt</primary>
158 <varlistentry id="deallocvt">
159 <term><command>deallocvt</command></term>
161 <para>Deallocates unused virtual terminals</para>
162 <indexterm zone="ch-system-kbd deallocvt">
163 <primary sortas="b-deallocvt">deallocvt</primary>
168 <varlistentry id="dumpkeys">
169 <term><command>dumpkeys</command></term>
171 <para>Dumps the keyboard translation tables</para>
172 <indexterm zone="ch-system-kbd dumpkeys">
173 <primary sortas="b-dumpkeys">dumpkeys</primary>
178 <varlistentry id="fgconsole">
179 <term><command>fgconsole</command></term>
181 <para>Prints the number of the active virtual terminal</para>
182 <indexterm zone="ch-system-kbd fgconsole">
183 <primary sortas="b-fgconsole">fgconsole</primary>
188 <varlistentry id="getkeycodes">
189 <term><command>getkeycodes</command></term>
191 <para>Prints the kernel scancode-to-keycode mapping table</para>
192 <indexterm zone="ch-system-kbd getkeycodes">
193 <primary sortas="b-getkeycodes">getkeycodes</primary>
198 <varlistentry id="kbdinfo">
199 <term><command>kbdinfo</command></term>
201 <para>Obtains information about the status of a console</para>
202 <indexterm zone="ch-system-kbd kbdinfo">
203 <primary sortas="b-kbdinfo">kbdinfo</primary>
208 <varlistentry id="kbd_mode">
209 <term><command>kbd_mode</command></term>
211 <para>Reports or sets the keyboard mode</para>
212 <indexterm zone="ch-system-kbd kbd_mode">
213 <primary sortas="b-kbd_mode">kbd_mode</primary>
218 <varlistentry id="kbdrate">
219 <term><command>kbdrate</command></term>
221 <para>Sets the keyboard repeat and delay rates</para>
222 <indexterm zone="ch-system-kbd kbdrate">
223 <primary sortas="b-kbdrate">kbdrate</primary>
228 <varlistentry id="loadkeys">
229 <term><command>loadkeys</command></term>
231 <para>Loads the keyboard translation tables</para>
232 <indexterm zone="ch-system-kbd loadkeys">
233 <primary sortas="b-loadkeys">loadkeys</primary>
238 <varlistentry id="loadunimap">
239 <term><command>loadunimap</command></term>
241 <para>Loads the kernel unicode-to-font mapping table</para>
242 <indexterm zone="ch-system-kbd loadunimap">
243 <primary sortas="b-loadunimap">loadunimap</primary>
248 <varlistentry id="mapscrn">
249 <term><command>mapscrn</command></term>
251 <para>An obsolete program that used to load a user-defined output
252 character mapping table into the console driver; this is now done
253 by <command>setfont</command></para>
254 <indexterm zone="ch-system-kbd mapscrn">
255 <primary sortas="b-mapscrn">mapscrn</primary>
260 <varlistentry id="openvt">
261 <term><command>openvt</command></term>
263 <para>Starts a program on a new virtual terminal (VT)</para>
264 <indexterm zone="ch-system-kbd openvt">
265 <primary sortas="b-openvt">openvt</primary>
270 <varlistentry id="psfaddtable">
271 <term><command>psfaddtable</command></term>
273 <para>Adds a Unicode character table to a console font</para>
274 <indexterm zone="ch-system-kbd psfaddtable">
275 <primary sortas="b-psfaddtable">psfaddtable</primary>
280 <varlistentry id="psfgettable">
281 <term><command>psfgettable</command></term>
283 <para>Extracts the embedded Unicode character table from a console
285 <indexterm zone="ch-system-kbd psfgettable">
286 <primary sortas="b-psfgettable">psfgettable</primary>
291 <varlistentry id="psfstriptable">
292 <term><command>psfstriptable</command></term>
294 <para>Removes the embedded Unicode character table from a console
296 <indexterm zone="ch-system-kbd psfstriptable">
297 <primary sortas="b-psfstriptable">psfstriptable</primary>
302 <varlistentry id="psfxtable">
303 <term><command>psfxtable</command></term>
305 <para>Handles Unicode character tables for console fonts</para>
306 <indexterm zone="ch-system-kbd psfxtable">
307 <primary sortas="b-psfxtable">psfxtable</primary>
312 <varlistentry id="setfont">
313 <term><command>setfont</command></term>
315 <para>Changes the Enhanced Graphic Adapter (EGA) and Video Graphics
316 Array (VGA) fonts on the console</para>
317 <indexterm zone="ch-system-kbd setfont">
318 <primary sortas="b-setfont">setfont</primary>
323 <varlistentry id="setkeycodes">
324 <term><command>setkeycodes</command></term>
326 <para>Loads kernel scancode-to-keycode mapping table entries; this is
327 useful if there are unusual keys on the keyboard</para>
328 <indexterm zone="ch-system-kbd setkeycodes">
329 <primary sortas="b-setkeycodes">setkeycodes</primary>
334 <varlistentry id="setleds">
335 <term><command>setleds</command></term>
337 <para>Sets the keyboard flags and Light Emitting Diodes (LEDs)</para>
338 <indexterm zone="ch-system-kbd setleds">
339 <primary sortas="b-setleds">setleds</primary>
344 <varlistentry id="setmetamode">
345 <term><command>setmetamode</command></term>
347 <para>Defines the keyboard meta-key handling</para>
348 <indexterm zone="ch-system-kbd setmetamode">
349 <primary sortas="b-setmetamode">setmetamode</primary>
354 <varlistentry id="setvtrgb">
355 <term><command>setvtrgb</command></term>
357 <para>Sets the console color map in all virtual terminals</para>
358 <indexterm zone="ch-system-kbd setvtrgb">
359 <primary sortas="b-setvtrgb">setvtrgb</primary>
364 <varlistentry id="showconsolefont">
365 <term><command>showconsolefont</command></term>
367 <para>Shows the current EGA/VGA console screen font</para>
368 <indexterm zone="ch-system-kbd showconsolefont">
369 <primary sortas="b-showconsolefont">showconsolefont</primary>
374 <varlistentry id="showkey">
375 <term><command>showkey</command></term>
377 <para>Reports the scancodes, keycodes, and ASCII codes of the keys
378 pressed on the keyboard</para>
379 <indexterm zone="ch-system-kbd showkey">
380 <primary sortas="b-showkey">showkey</primary>
385 <varlistentry id="unicode_start">
386 <term><command>unicode_start</command></term>
388 <para>Puts the keyboard and console in UNICODE mode [Don't use this
389 program unless your keymap file is in the ISO-8859-1 encoding. For
390 other encodings, this utility produces incorrect results.]</para>
391 <indexterm zone="ch-system-kbd unicode_start">
392 <primary sortas="b-unicode_start">unicode_start</primary>
397 <varlistentry id="unicode_stop">
398 <term><command>unicode_stop</command></term>
400 <para>Reverts keyboard and console from UNICODE mode</para>
401 <indexterm zone="ch-system-kbd unicode_stop">
402 <primary sortas="b-unicode_stop">unicode_stop</primary>