Build the xev program by typing make.
通过键入make来构建xev程序。
Listing 6. xev example program output.
清单6 . xev示例程序输出。
Save the updated file and rerun make to build the new version of xev.
保存更新后的文件并且再次运行make来构建新版本的xev。
To install xev from scratch, download xorg-x11-6.8.1.tar.gz and unpack it.
要从头安装xev,请下载并解压缩 xorg-x11-6.8.1.tar.gz。
To test your xev setup, open an xterm window and type the command xwininfo.
要测试xev设置,请打开一个xterm窗口并键入xwininfo命令。
Each event in a xev session is printed out with a high-resolution time value.
xev会话中的每个事件都是随高精度的时间值一同输出的。
One of the easiest ways to get xev is through a full X11 source code download.
获得xev的最简单方法之一是下载完整的X11源代码。
The xev program output lists every X Window System event in the attached window.
xev程序输出将在连接的窗口中列出每个XWindowSystem事件。
Copy xev to your current working directory for use by the password-entry program.
将xev复制到当前工作目录中,以供密码输入程序使用。
A xev program attached to the currently focused window will track any key presses or mouse movements.
与当前获得焦点的窗口关联的xev程序将跟踪所有按键或鼠标移动。
If the focus has changed between input reads, the old pipe to the xev process is killed and a new one started.
如果焦点在输入读取之间发生切换,则终止xev进程的旧通道并启动新通道。
Using the xev program as the event grabber allows for a seamless addition of the requirement for nonprintables.
将xev程序作为事件获取程序,允许无缝地添加不可打印字符要求。
The xev output is nonbuffered, which leads to seldom-used windows not filling the output buffer at a fast-enough rate.
xev输出是非缓冲的,这会造成较少使用的窗口无法以足够快的速度填充输出缓冲。
The simplistic yet powerful method that xev records keyboard events enables a seamless introduction of this new feature.
xev记录键盘事件的简单但强大的方法将无缝引入这项新功能。
You need to download the source code for xev even if it is already installed or available as a package for your distribution.
即使已经安装或者已在发行版软件包中获得xev,也需要下载 xev的源代码。
Keeping a running list available of which window currently has a pipe attached allows the xev output to be collected over a period of time.
维护一个由目前拥有管道的窗口组成的可用工作列表,将允许在一段时间内收集xev输出。
If you can build the xev program correctly, you'll need to make one simple change to print out the keystroke events with more precise timings.
如果可以正确构建xev程序,则需要执行一项简单更改,从而按照更精确的计时输出击键事件。
As you may recall from the xev testing performed above, an individual key press or key-release event causes four or five lines to be printed by the xev program.
从上面执行的xev测试可以看到,单个按键或释放事件将导致xev程序打印四行或五行输出。
Listing 5 shows the createPipe subroutine used to create a nonblocking link to the xev monitoring program, as well as the printHeader subroutine, which prints the data header information to STDERR.
清单5显示了用于创建与xev监视程序之间的非阻塞链接的createpipe子例程,以及用于将数据头信息输出到STDERR中的printheader子例程。
Listing 5 shows the createPipe subroutine used to create a nonblocking link to the xev monitoring program, as well as the printHeader subroutine, which prints the data header information to STDERR.
清单5显示了用于创建与xev监视程序之间的非阻塞链接的createpipe子例程,以及用于将数据头信息输出到STDERR中的printheader子例程。
应用推荐