kbd.xml 15 KB

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