kbd.xml 14 KB

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