“xev”输出的含义

A.B*_*.B. 6 xev

我需要澄清一下:

当我xev在终端中启动并使用时Super,我得到以下输出。这是什么意思?

KeymapNotify event, serial 36, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

FocusIn event, serial 36, synthetic NO, window 0x2000001,
    mode NotifyUngrab, detail NotifyNonlinear

KeymapNotify event, serial 36, synthetic NO, window 0x0,
    keys:  93  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0 
Run Code Online (Sandbox Code Playgroud)

Ser*_*nyy 2

因此,在网上研究了一段时间后,我对输出含义的理解如下:

看一下字母键的 KeyPress 和 KeyRelease 事件,例如m

KeyRelease event, serial 28, synthetic NO, window 0x6e00001,
    root 0x2c9, subw 0x0, time 17599679, (-746,426), root:(337,478),
    state 0x10, keycode 58 (keysym 0x6d, m), same_screen YES,
    XLookupString gives 1 bytes: (6d) "m"
    XFilterEvent returns: False
Run Code Online (Sandbox Code Playgroud)

它具有键码并报告按下该键的窗口 ID。

功能键,如Fn+ F6,实际上是亮度降低键,不会输出此类信息。他们报告窗口 ID 为 0x0,并且没有键盘代码。因此,这意味着这些键不能重新分配并由软件控制,例如X服务器或控制台;它们依赖于它们运行的​​环境。这也在一定程度上解释了为什么超级键可能会或可能不会在特定的桌面环境中工作 - 由开发人员将该键的功能包含到他们的桌面环境中。

MappingNotify event, serial 28, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeymapNotify event, serial 29, synthetic NO, window 0x0,
    keys:  1   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0  
Run Code Online (Sandbox Code Playgroud)