Since you're sure it's caused by hitting Shift + Space, you can check what X itself is doing by. First, run xev
from the command line, hit Shift + Space and check the output. For example, I see:
$ xev
KeyPress event, serial 29, synthetic NO, window 0x2000001,
root 0x3a, subw 0x0, time 4114211795, (-576,-249), root:(414,593),
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 29, synthetic NO, window 0x2000001,
root 0x3a, subw 0x0, time 4114213059, (-576,-249), root:(414,593),
state 0x1, keycode 65 (keysym 0x20, space), same_screen YES,
XLookupString gives 1 bytes: (20) " "
XmbLookupString gives 1 bytes: (20) " "
XFilterEvent returns: False
...
然后,运行xmodmap -pk
并查找键码(空格应为 65,如上所示,但请检查您的 xev 输出)。
如果你看到类似的东西
65 0x0020 (space)
那么 X 就不会这样做。另一方面,如果我选择一个字符键is修改者shift
,我看到这样的东西:
58 0x006d (m) 0x004d (M)
如果您的键码有两个或多个键符号,则 X 就是罪魁祸首。在这种情况下,类似的事情xmodmap -e 'keycode 65 space'
应该管用。