kbd.xml 14 KB

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