dumpkeys 中文man頁(yè)面
名稱(chēng) (NAME)
dumpkeys - 轉(zhuǎn)儲(chǔ)顯示鍵盤(pán)翻譯表
總覽 (SYNOPSIS)
dumpkeys [ -hilfn1 -Sshape -ccharset --help --short-info --long-info --numeric --full-table --separate-lines --shape=shape --funcs-only --keys-only --compose-only --charset=charset ]
描述 (DESCRIPTION)
dumpkeys 以 keymaps(5) 中 描述 的 格式, 在 標(biāo)準(zhǔn)輸出 顯示 鍵盤(pán)驅(qū)動(dòng)程序 翻譯表 的 當(dāng)前內(nèi)容.
下面 提供了 多種 選項(xiàng), 可以 控制 輸出格式, 也可以 顯示 來(lái)自 內(nèi)核 或 dumpkeys(1) 和 loadkeys(1) 的 其他信息.
選項(xiàng) (OPTION)
- -h --help
- 在 標(biāo)準(zhǔn)錯(cuò)誤 上 顯示 版本號(hào) 和 簡(jiǎn)短 的 用法, 然后 結(jié)束.
- -i --short-info
- 顯示 內(nèi)核 鍵盤(pán)驅(qū)動(dòng)程序 的 某些 特征:
- 內(nèi)核 支持的 鍵值(keycode) 范圍:
- 這個(gè)特征指, 在 鍵盤(pán)映射文件 中, keycode 關(guān)鍵字 后面 可以 使用 什么值. 有關(guān) 這個(gè)文件 的 語(yǔ)法 和 其他信息 參看 keymaps(5).
單鍵 可編聯(lián)(bind) 的 動(dòng)作(action) 數(shù):
- 這個(gè)特征指, 通過(guò) 修飾鍵 的 組合, 一個(gè)鍵 能夠 發(fā)生 多少個(gè) 不同的 動(dòng)作. 例如, 如果 該值是 16, 那么 一個(gè)鍵 結(jié)合 修飾鍵 可以 產(chǎn)生 多達(dá) 16 個(gè) 動(dòng)作. 此時(shí), 內(nèi)核 大約 知道 存在 四個(gè) 修飾鍵, 你可以 按下 不同的 修飾鍵 組合 獲得 所有 定義的 動(dòng)作.
內(nèi)核 支持的 動(dòng)作碼(action code) 值域(range):
- 這一項(xiàng) 包含 用 十六進(jìn)制 表示的 動(dòng)作碼 值域. 這些值 能夠 用在 按鍵定義 的 右邊, 也就是 下面 這行 的 vv 部分:
- keycode xx = vv vv vv vv
(有關(guān) 按鍵定義行 的 細(xì)節(jié) 參見(jiàn) keymaps(5) ). dumpkeys(1) 和 loadkeys(1) 支持 符號(hào)表示法, 它 比 數(shù)字表示法 更優(yōu)越, 內(nèi)核 和 內(nèi)核 之間的 動(dòng)作碼 可能不一樣, 而 符號(hào)名字 一般 不變. 然而, 動(dòng)作碼值域 列表 可以 用來(lái) 判斷 內(nèi)核 是否 支持 loadkeys(1) 識(shí)別的 全部 符號(hào), 或者 內(nèi)核 支持的 動(dòng)作 在 loadkeys(1) 中 有沒(méi)有 對(duì)應(yīng)的 符號(hào)名. 你 可以 比較一下 值域列表 和 動(dòng)作符號(hào)表, 參見(jiàn) 下述的 --long-info 選項(xiàng).
內(nèi)核 支持的 功能鍵(function key) 數(shù)目:
- 這個(gè)特征 指 能夠 用來(lái) 輸出 字符串 的 動(dòng)作碼 數(shù)目. 這些 動(dòng)作碼 往往 編聯(lián) 鍵盤(pán)上的 功能鍵 和 編輯鍵, 輸出 標(biāo)準(zhǔn) escape 序列. 然而 你 可以 重定義 這些鍵, 讓 它們 輸出 命令行, 電子郵件地址 或者 其他什么. 特別是 某些 編號(hào) 的 功能鍵 和 編輯鍵 在 鍵盤(pán)上 不存在, 這樣 就有了 "空閑的" 動(dòng)作碼, 例如, 把 它們 和 AltGr-字母組合 編聯(lián), 用來(lái) 輸出 有用的 字符串. 詳情 參見(jiàn) loadkeys(1).
功能串(function string):
- 可以 用 下面的 命令 查看 當(dāng)前 的 功能鍵 定義
- dumpkeys --funcs-only
- 內(nèi)核 支持的 鍵值(keycode) 范圍:
- -l --long-info
- 這個(gè)選項(xiàng) 要求 dumpkeys 顯示 較多的 信息. 顯示 的 信息 除了 --short-info 選項(xiàng) 的 內(nèi)容 外, 增加了 loadkeys(1) 和 dumpkeys(1) 支持 的 動(dòng)作 的 符號(hào)名 列表, 及 對(duì)應(yīng)的 數(shù)值.
- -n --numeric
- 這個(gè)選項(xiàng) 阻止 dumpkeys 把 動(dòng)作碼 翻譯成 符號(hào)名, 只 顯示 十六進(jìn)制數(shù)字.
- -f --full-table
- 這個(gè)選項(xiàng) 使 dumpkeys 跳過(guò) 所有 速記形式(short-hand) (參見(jiàn) keymaps(5)), 以 行排格式(canonical) 輸出 鍵值編聯(lián). 首先是 keymaps 行, 描述 當(dāng)前 定義的 修飾鍵 及其 組合. 然后 每個(gè)鍵 顯示 一行, 其中 每個(gè) 修飾鍵 的 組合 占 一列. 例如, 如果 鍵盤(pán)映射表 使用了 七個(gè) 修飾鍵組合, 那么 每行 將顯示 七列動(dòng)作碼. 這種格式 用于 諸如 對(duì) dumpkeys 輸出 的 后處理 等.
- -1 --separate-lines
- 這個(gè)選項(xiàng) 使 dumpkeys 把 每個(gè) (修飾鍵,鍵值)對(duì) 用 一行 顯示. 前綴 plain 表示 沒(méi)有 使用 修飾鍵.
- -S --shape=shape
- 這個(gè)選項(xiàng) 告訴 dumpkeys 使用 指定的 表格格式. 允許的 表格格式 有 0: 缺省格式 (就象 沒(méi)使用 -S 一樣); 1: 和 使用 選項(xiàng) --full-table 一樣; 2: 和 使用 選項(xiàng) --separate-lines 一樣; 3: 每個(gè) 鍵值 占用 一行 (就象 格式 1 一樣), 直到 遇到 ***個(gè) 空項(xiàng)(hole), 然后 每個(gè) (修飾鍵,鍵值)對(duì) 一行 (就象 格式 2 一樣).
(譯注: 空項(xiàng) 位置 可參考 dumpkeys 不帶參數(shù)時(shí) 顯示的 ***行, keymaps 行)
- --funcs-only
- 這個(gè)選項(xiàng) 使 dumpkeys 只顯示 功能鍵 定義的 字符串. 否則 dumpkeys 既顯示 串定義, 也顯示 鍵值編聯(lián).
- --keys-only
- 這個(gè)選項(xiàng) 使 dumpkeys 只顯示 鍵值編聯(lián). 否則 dumpkeys 既顯示 串定義, 也顯示 鍵值編聯(lián).
- --compose-only
- 這個(gè)選項(xiàng) 使 dumpkeys 只顯示 組合鍵(compose key) 定義. 它 只對(duì) 支持 組合鍵 的 內(nèi)核 有效.
- -ccharset --charset=charset
- 這個(gè)選項(xiàng) 使 dumpkeys 根據(jù) 指定的 字符集 翻譯 字符碼值. 它 只影響 字符碼值 對(duì) 符號(hào)名 的 翻譯. 用 --help 選項(xiàng) 可以 列出 charset 的 有效值. 如果 沒(méi)有 指定 charset, 缺省字符集 是 iso-8859-1. 這個(gè)選項(xiàng) 能夠 輸出 一個(gè) `charset "iso-8859-X"' 行, 告訴 loadkeys 如何 翻譯鍵盤(pán)映射表. (例如, "division" 在 iso-8859-1 中 是 0xf7, 但在 iso-8859-8 中 是 0xba).
文件 (FILE)
/usr/lib/kbd/keymaps/ 推薦 存放 鍵盤(pán)映射 文件 的 目錄.
另見(jiàn) (SEE ALSO)
loadkeys(1), keymaps(5).
#p#
NAME
dumpkeys - dump keyboard translation tables
SYNOPSIS
dumpkeys [ -hilfn -ccharset --help --short-info --long-info --numeric --full-table --funcs-only --keys-only --compose-only --charset=charset ]
DESCRIPTION
dumpkeys writes, to the standard output, the current contents of the keyboard driver's translation tables, in the format specified by keymaps(5).
Using the various options, the format of the output can be controlled and also other information from the kernel and the programs dumpkeys(1) and loadkeys(1) can be obtained.
OPTIONS
- -h --help
- Prints the program's version number and a short usage message to the program's standard error output and exits.
- -i --short-info
- Prints some characteristics of the kernel's keyboard driver. The items shown are:
- Keycode range supported by the kernel
- This tells what values can be used after the keycode keyword in keytable files. See keymaps(5) for more information and the syntax of these files.
Number of actions bindable to a key
- This tells how many different actions a single key can output using various modifier keys. If the value is 16 for example, you can define up to 16 different actions to a key combined with modifiers. When the value is 16, the kernel probably knows about four modifier keys, which you can press in different combinations with the key to access all the bound actions.
Ranges of action codes supported by the kernel
- This item contains a list of action code ranges in hexadecimal notation. These are the values that can be used in the right hand side of a key definition, ie. the vv's in a line
- keycode xx = vv vv vv vv
(see keymaps(5) for more information about the format of key definition lines). dumpkeys(1) and loadkeys(1) support a symbolic notation, which is preferable to the numeric one, as the action codes may vary from kernel to kernel while the symbolic names usually remain the same. However, the list of action code ranges can be used to determine, if the kernel actually supports all the symbols loadkeys(1) knows, or are there maybe some actions supported by the kernel that have no symbolic name in your loadkeys(1) program. To see this, you compare the range list with the action symbol list, see option --long-info below.
Number of function keys supported by kernel
- This tells the number of action codes that can be used to output strings of characters. These action codes are traditionally bound to the various function and editing keys of the keyboard and are defined to send standard escape sequences. However, you can redefine these to send common command lines, email addresses or whatever you like. Especially if the number of this item is greater than the number of function and editing keys in your keyboard, you may have some "spare" action codes that you can bind to AltGr-letter combinations, for example, to send some useful strings. See loadkeys(1) for more details.
Function strings
- You can see you current function key definitions with the command
- dumpkeys --funcs-only
- -l --long-info
- This option instructs dumpkeys to print a long information listing. The output is the same as with the --short-info appended with the list of action symbols supported by loadkeys(1) and dumpkeys(1), along with the symbols' numeric values.
- -n --numeric
- This option causes dumpkeys to by-pass the conversion of action code values to symbolic notation and to print the in hexadecimal format instead.
- -f --full-table
- This makes dumpkeys skip all the short-hand heuristics (see keymaps(5)) and output the key bindings in the canonical form. First a keymaps line describing the currently defined modifier combinations is printed. Then for each key a row with a column for each modifier combination is printed. For example, if the current keymap in use uses seven modifiers, every row will have seven action code columns. This format can be useful for example to programs that post-process the output of dumpkeys.
- --funcs-only
- When this option is given, dumpkeys prints only the function key string definitions. Normally dumpkeys prints both the key bindings and the string definitions.
- --keys-only
- When this option is given, dumpkeys prints only the key bindings. Normally dumpkeys prints both the key bindings and the string definitions.
- --compose-only
- When this option is given, dumpkeys prints only the compose key combinations. This option is available only if your kernel has compose key support.
- -ccharset --charset=charset
- This instructs dumpkeys to interpret character code values according to the specified character set. This affects only the translation of character code values to symbolic names. Valid values for charset currently are iso-8859-X, Where X is a digit in 1-9. If no charset is specified, iso-8859-1 is used as a default. This option produces an output line `charset "iso-8859-X"', telling loadkeys how to interpret the keymap. (For example, "division" is 0xf7 in iso-8859-1 but 0xba in iso-8859-8.)
FILES
- /lib/kbd/keymaps
- recommended directory for keytable files
SEE ALSO
loadkeys(1), keymaps(5)