kbd.xml 13 KB

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