我正在运行 xfce,据我所知,暂停键未映射为热键。当按下暂停键时,它只会产生:
FocusOut event, serial 37, synthetic NO, window 0x3000001,
mode NotifyGrab, detail NotifyAncestor
FocusOut event, serial 37, synthetic NO, window 0x3000001,
mode NotifyUngrab, detail NotifyPointer
FocusIn event, serial 37, synthetic NO, window 0x3000001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 37, 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
如果我将暂停键重新映射到完全不同的东西也没关系,例如:
key <PAUS> {
// type= "PC_CONTROL_LEVEL2",
symbols[Group1]= [ p, Break ]
};
如果我按 Shift+Pause 我会得到响应:
KeyPress event, serial 37, synthetic NO, window 0x3000001,
root 0x1ef, subw 0x0, time 679325549, (37,115), root:(1228,774),
state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x3000001,
root 0x1ef, subw 0x0, time 679325877, (37,115), root:(1228,774),
state 0x1, keycode 127 (keysym 0xff6b, Break), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3000001,
root 0x1ef, subw 0x0, time 679325901, (37,115), root:(1228,774),
state 0x1, keycode 127 (keysym 0xff6b, Break), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3000001,
root 0x1ef, subw 0x0, time 679326061, (37,115), root:(1228,774),
state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
为什么未移位的暂停键达不到 xev?
FocusIn
和事件表明FocusOut
其他应用程序(可能是窗口管理器,可能是桌面的其他部分,可能是完全不同的应用程序)正在窃取这些事件,因为它已经向 X 服务器注册了对这些特定键的兴趣。因此,虽然它们可能不会在 xfce 中“映射为热键”,但某些应用程序仍会尝试对它们做出反应。
调试此问题的明显方法是停止/终止应用程序,直到您再次在
xev
. 的输出xlsclients
应该有助于找出候选人。