showkey 中文man页面

系统
按下/松开任一个键 时, showkey 在标准输出显示对应的扫描码(scan code), 键盘码(keycode), 或者字符值.如果连续10 秒钟没发生按下/松开按键事件(该值 可用 --timeout 或 -t 设置), 本程序自动结束. 来自其他进程的某些信号也可以结束程序, 例如SIGTERM.

名称 (NAME)

showkey - 检查来自键盘的扫描码和键盘码

总览 (SYNOPSIS)

showkey [ -[hVskm] | --help | --version | --scancodes | --keycodes | --keymap ] [ -t N | --timeout=N ]

描述 (DESCRIPTION)

按下/松开任一个键 时, showkey 在标准输出显示对应的扫描码(scan code), 键盘码(keycode), 或者字符值.如果连续10 秒钟没发生按下/松开按键事件(该值 可用 --timeout-t 设置), 本程序自动结束. 来自其他进程的某些信号也可以结束程序, 例如SIGTERM.

showkey 有 三种 操作模式, 显示 扫描码, 键盘码, 以及 测试 键盘映射(keymap), 可以 通过 命令行选项 选择 操作模式.

命令 (COMMAND)

-h, --help
showkey 在 标准错误 上 显示 版本号, 简短 的 用法, 然后 结束.
-V, --version
showkey 在 标准错误 上 显示 版本号, 然后 结束.
-s, --scancodes
showkey 显示 扫描码.

在 这个模式 下, showkey 以 十六进制数 形式 显示 来自 键盘 的 每个 字节. 如果 两个 字节 间隔达到 0.1 秒, 或者 接收缓冲 已满, showkey 就 输出 一个 换行符. 可以 用它 大致 确定 某个键 按下 时, 键盘 输出些 什么 字节序列. 扫描码模式 主要 用来 调试 键盘驱动程序, 或者 其他 类似的 低层 接口. 一般 最终用户 对它 不太有 兴趣.

-k, --keycodes
showkey 显示 键盘码. 它 是 缺省模式.

在 这个模式 下, showkey 显示 每个键 按下 或 松开 时 对应的 键盘码. 键盘码 是 内核 分配给 每个 物理 按键 的 数值. 无论 键盘 输出 单个 还是多个 扫描码, 每个 按键 只能 对应 一个 键盘码. 使用 这个模式, showkey 能够 查出 订制 键盘映射文件 时 使用 什么 数值.

-m, --keymap
showkey 显示 键盘映射.

在 这个模式 下, showkey 显示 内核 根据 当前 键盘映射表 翻译 出来 的 字符. 它 可能 对 安装程序 的 作者 有用, 允许 用户 在 确认 安装 前 测试 新的 键盘.

选项 (OPTION)

-t N, --timeout=N
这个选项 用于 修改 超时值 (单位为秒), 取代 原来的 10 秒.

作者 (AUTHOR)

showkey 是 Risto Kankkunen 为 kbd-0.81 开发的.

后来 Yann Dirson <dirson@debian.org> 做了 扩展, 使它 能够 支持 --keymap 命令 和 --timeout 选项.

BUGS

--keymap 模式 应该能 报告 功能键 (action key), 显示 执行 哪些 功能, 而不是执行 这些 功能.

另见 (SEE ALSO)

loadkeys(1), dumpkeys(1), keymaps(5).

#p#

NAME

showkey - examine the codes sent by the keyboard  

SYNOPSIS

showkey [-h|--help] [-a|--ascii] [-s|--scancodes] [-k|--keycodes]  

DESCRIPTION

showkey prints to standard output either the scan codes or the keycode or the `ascii' code of each key pressed. In the first two modes the program runs until 10 seconds have elapsed since the last key press or release event, or until it receives a suitable signal, like SIGTERM, from another process. In `ascii' mode the program terminates when the user types ^D.

When in scancode dump mode, showkey prints in hexadecimal format each byte received from the keyboard to the standard output. A new line is printed when an interval of about 0.1 seconds occurs between the bytes received, or when the internal receive buffer fills up. This can be used to determine roughly, what byte sequences the keyboard sends at once on a given key press. The scan code dumping mode is primarily intended for debugging the keyboard driver or other low level interfaces. As such it shouldn't be of much interest to the regular end-user. However, some modern keyboards have keys or buttons that produce scancodes to which the kernel does not associate a keycode, and, after finding out what these are, the user can assign keycodes with setkeycodes(8).

When in the default keycode dump mode, showkey prints to the standard output the keycode number or each key pressed or released. The kind of the event, press or release, is also reported. Keycodes are numbers assigned by the kernel to each individual physical key. Every key has always only one associated keycode number, whether the keyboard sends single or multiple scan codes when pressing it. Using showkey in this mode, you can find out what numbers to use in your personalized keymap files.

When in `ascii' dump mode, showkey prints to the standard output the decimal, octal, and hexadecimal value(s) of the key pressed, according to he present keymap.  

OPTIONS

-h --help
showkey prints to the standard error output its version number, a compile option and a short usage message, then exits.
-s --scancodes
Starts showkey in scan code dump mode.
-k --keycodes
Starts showkey in keycode dump mode. This is the default, when no command line options are present.
-a --ascii
Starts showkey in `ascii' dump mode.

SEE ALSO

loadkeys(1), dumpkeys(1), keymaps(5), setkeycodes(8)

责任编辑:韩亚珊 来源: www.linuxforum.net/man-pages/
相关推荐

2011-08-24 16:48:36

man中文man

2011-08-15 10:21:09

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-25 15:39:42

fcloseall中文man

2011-08-25 15:00:15

cfgetispeed中文man

2011-08-19 18:35:50

issue中文man

2011-08-25 17:03:51

pclose中文man

2011-08-25 17:40:25

setvbuf中文man

2011-08-23 14:21:16

poweroff中文man

2011-08-24 15:52:59

intro中文man

2011-08-23 13:40:31

2011-08-25 15:54:08

ferror中文man

2011-08-25 17:24:54

puts中文man

2011-08-25 18:34:55

ungetc中文man

2011-08-23 10:03:40

useradd中文man

2011-08-23 10:29:02

chpasswd中文man

2011-08-23 10:34:22

convertquot中文man

2011-08-23 15:39:34

rpmbuild中文man

2011-08-24 15:48:38

INSERT中文man
点赞
收藏

51CTO技术栈公众号