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