kbd.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <?xml version="1.0" encoding="UTF-8"?>
  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>Kbd 软件包包含按键表文件、控制台字体和键盘工具。</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>安装 Kbd</title>
  32. <para>退格和删除键的行为在 Kbd 软件包的不同按键映射中不一致。
  33. 以下补丁修复 i386 按键映射中的这个问题:</para>
  34. <screen><userinput remap="pre">patch -Np1 -i ../&kbd-backspace-patch;</userinput></screen>
  35. <para>在修补后,退格键生成编码为 127 的字符,删除键生成广为人知的
  36. escape 序列。</para>
  37. <para>删除多余的 <command>resizecons</command> 程序(它需要已经不存在的
  38. svgalib 提供视频模式文件 —— 一般使用 <command>setfont</command>
  39. 即可调整控制台大小)及其 man 页面。</para>
  40. <screen><userinput remap="pre">sed -i 's/\(RESIZECONS_PROGS=\)yes/\1no/g' configure
  41. sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in</userinput></screen>
  42. <para>准备安装 Kbd:</para>
  43. <screen><userinput remap="configure">PKG_CONFIG_PATH=/tools/lib/pkgconfig ./configure --prefix=/usr --disable-vlock</userinput></screen>
  44. <variablelist>
  45. <title>配置选项的含义:</title>
  46. <!--
  47. <varlistentry>
  48. <term><parameter>- -datadir=/lib/kbd</parameter></term>
  49. <listitem>
  50. <para>This option puts keyboard layout data in a directory that will
  51. always be on the root partition instead of the default <filename
  52. class="directory">/usr/share/kbd</filename>.</para>
  53. </listitem>
  54. </varlistentry>
  55. -->
  56. <varlistentry>
  57. <term><parameter>--disable-vlock</parameter></term>
  58. <listitem>
  59. <para>该选项防止构建 vlock 工具,因为它需要 chroot 环境中不可用的
  60. PAM 库。</para>
  61. </listitem>
  62. </varlistentry>
  63. </variablelist>
  64. <para>编译该软件包:</para>
  65. <screen><userinput remap="make">make</userinput></screen>
  66. <para>运行以下命令以测试编译结果:</para>
  67. <screen><userinput remap="test">make check</userinput></screen>
  68. <para>安装该软件包:</para>
  69. <screen><userinput remap="install">make install</userinput></screen>
  70. <note>
  71. <para>对于白罗斯文,Kbd 软件包没有提供有用的、
  72. 假设白罗斯文使用 ISO-8859-5 编码的键盘映射,而是一般使用 CP1251
  73. 键盘映射。使用白罗斯文等文字的用户需要单独下载可工作的键盘映射。
  74. </para>
  75. </note>
  76. <!--
  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. -->
  85. <para>如果需要的话,安装文档:</para>
  86. <screen><userinput remap="install">mkdir -v /usr/share/doc/kbd-&kbd-version;
  87. cp -R -v docs/doc/* /usr/share/doc/kbd-&kbd-version;</userinput></screen>
  88. </sect2>
  89. <sect2 id="contents-kbd" role="content">
  90. <title>Kbd 的内容</title>
  91. <segmentedlist>
  92. <segtitle>安装的程序</segtitle>
  93. <segtitle>安装的目录</segtitle>
  94. <seglistitem>
  95. <seg>chvt, deallocvt, dumpkeys, fgconsole, getkeycodes, kbdinfo,
  96. kbd_mode, kbdrate, loadkeys, loadunimap,
  97. mapscrn, openvt, psfaddtable (到 psfxtable 的链接), psfgettable (到
  98. psfxtable 的链接), psfstriptable (到 psfxtable 的链接), psfxtable, <!--resizecons,-->
  99. setfont, setkeycodes, setleds, setmetamode, setvtrgb,
  100. showconsolefont, showkey, unicode_start, 以及 unicode_stop</seg>
  101. <seg>/usr/share/consolefonts, /usr/share/consoletrans, /usr/share/keymaps,
  102. /usr/share/doc/kbd-&kbd-version;, 以及 /usr/share/unimaps</seg>
  103. </seglistitem>
  104. </segmentedlist>
  105. <variablelist>
  106. <bridgehead renderas="sect3">简要描述</bridgehead>
  107. <?dbfo list-presentation="list"?>
  108. <?dbhtml list-presentation="table"?>
  109. <varlistentry id="chvt">
  110. <term><command>chvt</command></term>
  111. <listitem>
  112. <para>修改当前虚拟终端</para>
  113. <indexterm zone="ch-system-kbd chvt">
  114. <primary sortas="b-chvt">chvt</primary>
  115. </indexterm>
  116. </listitem>
  117. </varlistentry>
  118. <varlistentry id="deallocvt">
  119. <term><command>deallocvt</command></term>
  120. <listitem>
  121. <para>取消未使用的虚拟终端分配</para>
  122. <indexterm zone="ch-system-kbd deallocvt">
  123. <primary sortas="b-deallocvt">deallocvt</primary>
  124. </indexterm>
  125. </listitem>
  126. </varlistentry>
  127. <varlistentry id="dumpkeys">
  128. <term><command>dumpkeys</command></term>
  129. <listitem>
  130. <para>转储键盘转换表</para>
  131. <indexterm zone="ch-system-kbd dumpkeys">
  132. <primary sortas="b-dumpkeys">dumpkeys</primary>
  133. </indexterm>
  134. </listitem>
  135. </varlistentry>
  136. <varlistentry id="fgconsole">
  137. <term><command>fgconsole</command></term>
  138. <listitem>
  139. <para>打印活动虚拟终端的个数</para>
  140. <indexterm zone="ch-system-kbd fgconsole">
  141. <primary sortas="b-fgconsole">fgconsole</primary>
  142. </indexterm>
  143. </listitem>
  144. </varlistentry>
  145. <varlistentry id="getkeycodes">
  146. <term><command>getkeycodes</command></term>
  147. <listitem>
  148. <para>打印内核扫描码到键码的映射表</para>
  149. <indexterm zone="ch-system-kbd getkeycodes">
  150. <primary sortas="b-getkeycodes">getkeycodes</primary>
  151. </indexterm>
  152. </listitem>
  153. </varlistentry>
  154. <varlistentry id="kbdinfo">
  155. <term><command>kbdinfo</command></term>
  156. <listitem>
  157. <para>获取终端状态信息</para>
  158. <indexterm zone="ch-system-kbd kbdinfo">
  159. <primary sortas="b-kbdinfo">kbdinfo</primary>
  160. </indexterm>
  161. </listitem>
  162. </varlistentry>
  163. <varlistentry id="kbd_mode">
  164. <term><command>kbd_mode</command></term>
  165. <listitem>
  166. <para>报告或设置键盘模式</para>
  167. <indexterm zone="ch-system-kbd kbd_mode">
  168. <primary sortas="b-kbd_mode">kbd_mode</primary>
  169. </indexterm>
  170. </listitem>
  171. </varlistentry>
  172. <varlistentry id="kbdrate">
  173. <term><command>kbdrate</command></term>
  174. <listitem>
  175. <para>设置键盘重复和延迟率</para>
  176. <indexterm zone="ch-system-kbd kbdrate">
  177. <primary sortas="b-kbdrate">kbdrate</primary>
  178. </indexterm>
  179. </listitem>
  180. </varlistentry>
  181. <varlistentry id="loadkeys">
  182. <term><command>loadkeys</command></term>
  183. <listitem>
  184. <para>加载键盘翻译表</para>
  185. <indexterm zone="ch-system-kbd loadkeys">
  186. <primary sortas="b-loadkeys">loadkeys</primary>
  187. </indexterm>
  188. </listitem>
  189. </varlistentry>
  190. <varlistentry id="loadunimap">
  191. <term><command>loadunimap</command></term>
  192. <listitem>
  193. <para>加载内核 unicode 到字体的映射表</para>
  194. <indexterm zone="ch-system-kbd loadunimap">
  195. <primary sortas="b-loadunimap">loadunimap</primary>
  196. </indexterm>
  197. </listitem>
  198. </varlistentry>
  199. <varlistentry id="mapscrn">
  200. <term><command>mapscrn</command></term>
  201. <listitem>
  202. <para>一个过时程序,
  203. 曾用于将用户定义输出字符映射表加载到终端驱动程序;
  204. 现在该任务由 <command>setfont</command> 完成</para>
  205. <indexterm zone="ch-system-kbd mapscrn">
  206. <primary sortas="b-mapscrn">mapscrn</primary>
  207. </indexterm>
  208. </listitem>
  209. </varlistentry>
  210. <varlistentry id="openvt">
  211. <term><command>openvt</command></term>
  212. <listitem>
  213. <para>在新的虚拟终端(VT)启动程序</para>
  214. <indexterm zone="ch-system-kbd openvt">
  215. <primary sortas="b-openvt">openvt</primary>
  216. </indexterm>
  217. </listitem>
  218. </varlistentry>
  219. <varlistentry id="psfaddtable">
  220. <term><command>psfaddtable</command></term>
  221. <listitem>
  222. <para>向控制台字体增加 Unicode 字符表</para>
  223. <indexterm zone="ch-system-kbd psfaddtable">
  224. <primary sortas="b-psfaddtable">psfaddtable</primary>
  225. </indexterm>
  226. </listitem>
  227. </varlistentry>
  228. <varlistentry id="psfgettable">
  229. <term><command>psfgettable</command></term>
  230. <listitem>
  231. <para>提取控制台字体中嵌入的 Unicode 字符表</para>
  232. <indexterm zone="ch-system-kbd psfgettable">
  233. <primary sortas="b-psfgettable">psfgettable</primary>
  234. </indexterm>
  235. </listitem>
  236. </varlistentry>
  237. <varlistentry id="psfstriptable">
  238. <term><command>psfstriptable</command></term>
  239. <listitem>
  240. <para>删除控制台字体中嵌入的 Unicode 字符表</para>
  241. <indexterm zone="ch-system-kbd psfstriptable">
  242. <primary sortas="b-psfstriptable">psfstriptable</primary>
  243. </indexterm>
  244. </listitem>
  245. </varlistentry>
  246. <varlistentry id="psfxtable">
  247. <term><command>psfxtable</command></term>
  248. <listitem>
  249. <para>处理控制台字体的 Unicode 字符表</para>
  250. <indexterm zone="ch-system-kbd psfxtable">
  251. <primary sortas="b-psfxtable">psfxtable</primary>
  252. </indexterm>
  253. </listitem>
  254. </varlistentry>
  255. <varlistentry id="setfont">
  256. <term><command>setfont</command></term>
  257. <listitem>
  258. <para>修改控制台上的增强图形适配器(EGA)和视频图像阵列(VGA)
  259. 字体</para>
  260. <indexterm zone="ch-system-kbd setfont">
  261. <primary sortas="b-setfont">setfont</primary>
  262. </indexterm>
  263. </listitem>
  264. </varlistentry>
  265. <varlistentry id="setkeycodes">
  266. <term><command>setkeycodes</command></term>
  267. <listitem>
  268. <para>加载内核扫描码到键码的映射表项;
  269. 在键盘上由特殊按键时很有用</para>
  270. <indexterm zone="ch-system-kbd setkeycodes">
  271. <primary sortas="b-setkeycodes">setkeycodes</primary>
  272. </indexterm>
  273. </listitem>
  274. </varlistentry>
  275. <varlistentry id="setleds">
  276. <term><command>setleds</command></term>
  277. <listitem>
  278. <para>设置键盘标志位和发光二极管(LED)</para>
  279. <indexterm zone="ch-system-kbd setleds">
  280. <primary sortas="b-setleds">setleds</primary>
  281. </indexterm>
  282. </listitem>
  283. </varlistentry>
  284. <varlistentry id="setmetamode">
  285. <term><command>setmetamode</command></term>
  286. <listitem>
  287. <para>定义键盘元键处理</para>
  288. <indexterm zone="ch-system-kbd setmetamode">
  289. <primary sortas="b-setmetamode">setmetamode</primary>
  290. </indexterm>
  291. </listitem>
  292. </varlistentry>
  293. <varlistentry id="setvtrgb">
  294. <term><command>setvtrgb</command></term>
  295. <listitem>
  296. <para>设定所有虚拟终端的控制台颜色映射</para>
  297. <indexterm zone="ch-system-kbd setvtrgb">
  298. <primary sortas="b-setvtrgb">setvtrgb</primary>
  299. </indexterm>
  300. </listitem>
  301. </varlistentry>
  302. <varlistentry id="showconsolefont">
  303. <term><command>showconsolefont</command></term>
  304. <listitem>
  305. <para>显示当前 EGA/VGA 控制台屏幕字体</para>
  306. <indexterm zone="ch-system-kbd showconsolefont">
  307. <primary sortas="b-showconsolefont">showconsolefont</primary>
  308. </indexterm>
  309. </listitem>
  310. </varlistentry>
  311. <varlistentry id="showkey">
  312. <term><command>showkey</command></term>
  313. <listitem>
  314. <para>报告键盘按键的扫描码、键码和 ASCII 编码</para>
  315. <indexterm zone="ch-system-kbd showkey">
  316. <primary sortas="b-showkey">showkey</primary>
  317. </indexterm>
  318. </listitem>
  319. </varlistentry>
  320. <varlistentry id="unicode_start">
  321. <term><command>unicode_start</command></term>
  322. <listitem>
  323. <para>将键盘和控制台设定为 UNICODE 模式 [不要使用该程序,
  324. 除非您的键盘映射文件是 ISO-8859-1 编码的。
  325. 对于其他编码,该工具产生错误结果。]</para>
  326. <indexterm zone="ch-system-kbd unicode_start">
  327. <primary sortas="b-unicode_start">unicode_start</primary>
  328. </indexterm>
  329. </listitem>
  330. </varlistentry>
  331. <varlistentry id="unicode_stop">
  332. <term><command>unicode_stop</command></term>
  333. <listitem>
  334. <para>使键盘和控制台退出 UNICODE 模式</para>
  335. <indexterm zone="ch-system-kbd unicode_stop">
  336. <primary sortas="b-unicode_stop">unicode_stop</primary>
  337. </indexterm>
  338. </listitem>
  339. </varlistentry>
  340. </variablelist>
  341. </sect2>
  342. </sect1>