Bor*_*ski 3 keyboard-shortcuts keyboard x11
在某些应用程序中,输入大写字母的作用类似于按 ESC 键。
再现:
此时,新文件夹的创建被取消。(如 ESC 键被击中)
这种行为也存在于许多不同的程序和游戏中。
使用xev
(按 Shift+d)分析情况
# xev
KeyPress event, serial 37, synthetic NO, window 0x4c00001,
root 0x259, subw 0x0, time 994702, (15,-13), root:(987,197),
state 0x10, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
FocusOut event, serial 37, synthetic NO, window 0x4c00001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 37, synthetic NO, window 0x4c00001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 37, synthetic NO, window 0x0,
keys: 89 0 0 0 0 1 4 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
KeyPress event, serial 37, synthetic NO, window 0x4c00001,
root 0x259, subw 0x0, time 994927, (15,-13), root:(987,197),
state 0x11, keycode 40 (keysym 0x44, D), same_screen YES,
XLookupString gives 1 bytes: (44) "D"
XmbLookupString gives 1 bytes: (44) "D"
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x4c00001,
root 0x259, subw 0x0, time 995062, (15,-13), root:(987,197),
state 0x11, keycode 40 (keysym 0x44, D), same_screen YES,
XLookupString gives 1 bytes: (44) "D"
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x4c00001,
root 0x259, subw 0x0, time 995395, (15,-13), root:(987,197),
state 0x11, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Run Code Online (Sandbox Code Playgroud)
我认为,FocusOut
和FocusIn
事件看起来很可疑。
Linux:Ubuntu 14.04 LTS 32 位,Unity
如何修复我的系统?欢迎任何想法或进一步的测试!
编辑:解决方案
我曾经将语言切换配置为 LeftShift+RightShift。这工作了多年,但在某些时候成为问题。无论如何,将 switch 配置为任何其他组合键解决了这个问题。
Run Code Online (Sandbox Code Playgroud)FocusOut event, serial 37, synthetic NO, window 0x4c00001, mode NotifyGrab, detail NotifyAncestor FocusIn event, serial 37, synthetic NO, window 0x4c00001, mode NotifyUngrab, detail NotifyAncestor
什么,当你按下发生的A与Shift保持是一个被动的抢:有其中有超过这个组合键独家控制的X客户端,并按下组合键时,该事件只能转移到客户端,而不是xev
或其他任何人。xev
确实报告客户端在发生时抓住了组合键,并在结束时取消了它。
用外行的话来说,有一个程序被定义为Shift+A全局键绑定。这也可能是在那里你的意思是绑定一个错字Shift+ Alt+key或Win+ Shift+A的东西。
在在命令行上操作 X 键和指针抓取中,我询问了如何找到抓取者是谁。我发现的最好方法只报告主动抓取,因此在查询信息时必须关闭密钥。
sleep 1; xdotool key XF86LogGrabInfo
。xdotool
运行。/var/log/Xorg.0.log
(0
反映显示编号,即$DISPLAY
:if $DISPLAY
is:1
或:1.0
then look at/var/log/Xorg.1.log
中的编号等)。以下是一些示例输出,显示我按下的键是锯鱼定义的键绑定:
[2292688.331] Active grab 0x41602244 (core) on device 'Virtual core keyboard' (3):
[2292688.331] client pid 6745 sawfish
[2292688.331] at 2292687547 (from passive grab) (device thawed, state 3)
[2292688.331] core event mask 0x3
[2292688.331] passive grab type 2, detail 0x4e, activating key 78
[2292688.331] owner-events false, kb 0 ptr 0, confine 0, cursor 0x0
[2292688.331] (II) End list of active device grabs
Run Code Online (Sandbox Code Playgroud)