kbd.xml 14 KB

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