dumpkeys 中文man頁面
名稱 (NAME)
dumpkeys - 轉儲顯示鍵盤翻譯表
總覽 (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) 中 描述 的 格式, 在 標準輸出 顯示 鍵盤驅動程序 翻譯表 的 當前內容.
下面 提供了 多種 選項, 可以 控制 輸出格式, 也可以 顯示 來自 內核 或 dumpkeys(1) 和 loadkeys(1) 的 其他信息.
選項 (OPTION)
- -h --help
- 在 標準錯誤 上 顯示 版本號 和 簡短 的 用法, 然后 結束.
- -i --short-info
- 顯示 內核 鍵盤驅動程序 的 某些 特征:
- 內核 支持的 鍵值(keycode) 范圍:
- 這個特征指, 在 鍵盤映射文件 中, keycode 關鍵字 后面 可以 使用 什么值. 有關 這個文件 的 語法 和 其他信息 參看 keymaps(5).
單鍵 可編聯(bind) 的 動作(action) 數:
- 這個特征指, 通過 修飾鍵 的 組合, 一個鍵 能夠 發生 多少個 不同的 動作. 例如, 如果 該值是 16, 那么 一個鍵 結合 修飾鍵 可以 產生 多達 16 個 動作. 此時, 內核 大約 知道 存在 四個 修飾鍵, 你可以 按下 不同的 修飾鍵 組合 獲得 所有 定義的 動作.
內核 支持的 動作碼(action code) 值域(range):
- 這一項 包含 用 十六進制 表示的 動作碼 值域. 這些值 能夠 用在 按鍵定義 的 右邊, 也就是 下面 這行 的 vv 部分:
- keycode xx = vv vv vv vv
(有關 按鍵定義行 的 細節 參見 keymaps(5) ). dumpkeys(1) 和 loadkeys(1) 支持 符號表示法, 它 比 數字表示法 更優越, 內核 和 內核 之間的 動作碼 可能不一樣, 而 符號名字 一般 不變. 然而, 動作碼值域 列表 可以 用來 判斷 內核 是否 支持 loadkeys(1) 識別的 全部 符號, 或者 內核 支持的 動作 在 loadkeys(1) 中 有沒有 對應的 符號名. 你 可以 比較一下 值域列表 和 動作符號表, 參見 下述的 --long-info 選項.
內核 支持的 功能鍵(function key) 數目:
- 這個特征 指 能夠 用來 輸出 字符串 的 動作碼 數目. 這些 動作碼 往往 編聯 鍵盤上的 功能鍵 和 編輯鍵, 輸出 標準 escape 序列. 然而 你 可以 重定義 這些鍵, 讓 它們 輸出 命令行, 電子郵件地址 或者 其他什么. 特別是 某些 編號 的 功能鍵 和 編輯鍵 在 鍵盤上 不存在, 這樣 就有了 "空閑的" 動作碼, 例如, 把 它們 和 AltGr-字母組合 編聯, 用來 輸出 有用的 字符串. 詳情 參見 loadkeys(1).
功能串(function string):
- 可以 用 下面的 命令 查看 當前 的 功能鍵 定義
- dumpkeys --funcs-only
- 內核 支持的 鍵值(keycode) 范圍:
- -l --long-info
- 這個選項 要求 dumpkeys 顯示 較多的 信息. 顯示 的 信息 除了 --short-info 選項 的 內容 外, 增加了 loadkeys(1) 和 dumpkeys(1) 支持 的 動作 的 符號名 列表, 及 對應的 數值.
- -n --numeric
- 這個選項 阻止 dumpkeys 把 動作碼 翻譯成 符號名, 只 顯示 十六進制數字.
- -f --full-table
- 這個選項 使 dumpkeys 跳過 所有 速記形式(short-hand) (參見 keymaps(5)), 以 行排格式(canonical) 輸出 鍵值編聯. 首先是 keymaps 行, 描述 當前 定義的 修飾鍵 及其 組合. 然后 每個鍵 顯示 一行, 其中 每個 修飾鍵 的 組合 占 一列. 例如, 如果 鍵盤映射表 使用了 七個 修飾鍵組合, 那么 每行 將顯示 七列動作碼. 這種格式 用于 諸如 對 dumpkeys 輸出 的 后處理 等.
- -1 --separate-lines
- 這個選項 使 dumpkeys 把 每個 (修飾鍵,鍵值)對 用 一行 顯示. 前綴 plain 表示 沒有 使用 修飾鍵.
- -S --shape=shape
- 這個選項 告訴 dumpkeys 使用 指定的 表格格式. 允許的 表格格式 有 0: 缺省格式 (就象 沒使用 -S 一樣); 1: 和 使用 選項 --full-table 一樣; 2: 和 使用 選項 --separate-lines 一樣; 3: 每個 鍵值 占用 一行 (就象 格式 1 一樣), 直到 遇到 ***個 空項(hole), 然后 每個 (修飾鍵,鍵值)對 一行 (就象 格式 2 一樣).
(譯注: 空項 位置 可參考 dumpkeys 不帶參數時 顯示的 ***行, keymaps 行)
- --funcs-only
- 這個選項 使 dumpkeys 只顯示 功能鍵 定義的 字符串. 否則 dumpkeys 既顯示 串定義, 也顯示 鍵值編聯.
- --keys-only
- 這個選項 使 dumpkeys 只顯示 鍵值編聯. 否則 dumpkeys 既顯示 串定義, 也顯示 鍵值編聯.
- --compose-only
- 這個選項 使 dumpkeys 只顯示 組合鍵(compose key) 定義. 它 只對 支持 組合鍵 的 內核 有效.
- -ccharset --charset=charset
- 這個選項 使 dumpkeys 根據 指定的 字符集 翻譯 字符碼值. 它 只影響 字符碼值 對 符號名 的 翻譯. 用 --help 選項 可以 列出 charset 的 有效值. 如果 沒有 指定 charset, 缺省字符集 是 iso-8859-1. 這個選項 能夠 輸出 一個 `charset "iso-8859-X"' 行, 告訴 loadkeys 如何 翻譯鍵盤映射表. (例如, "division" 在 iso-8859-1 中 是 0xf7, 但在 iso-8859-8 中 是 0xba).
文件 (FILE)
/usr/lib/kbd/keymaps/ 推薦 存放 鍵盤映射 文件 的 目錄.
另見 (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)