![为什么只有 LCtrl+Left 和 LShift+left 不起作用?](https://linux22.com/image/185187/%E4%B8%BA%E4%BB%80%E4%B9%88%E5%8F%AA%E6%9C%89%20LCtrl%2BLeft%20%E5%92%8C%20LShift%2Bleft%20%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8%EF%BC%9F.png)
在Linux(Kali)上,我最近有一个奇怪的行为(我之前没有注意到):
- RCtrl+Right Arrow作品
- RCtrl+Left Arrow作品
- RShift+Right Arrow作品
- RShift+Left Arrow作品
- LCtrl+Right Arrow作品
- LCtrl+Left Arrow 不起作用
- LShift+Right Arrow作品
- LShift+Left Arrow 不起作用
- RCtrl+ RShift+Right作品(选择下一个单词)
- LCtrl+ RShift+Right作品(相同)
- LCtrl+ RShift+Left 不起作用
- LCtrl+ LShift+Left 不起作用
所以看起来除了LCtrl / LShift+Left arrow组合之外,所有按键都工作正常。
知道为什么会出现这种奇怪的行为吗?
预期行为和调查更新:
我希望LCtrl+的行为与+Left arrow相同(或与+类似):它应该将光标移动到前一个单词。我们和朋友一起挖掘了更多,最终发现使用具有相同配置的外部键盘似乎可以按预期工作(两个键+向左箭头移动到上一个单词),所以,我猜这是与第一个相关的硬件键盘(笔记本电脑键盘)。RCtrlLeft arrowLCtrlRight arrowCtrl
有什么建议可以“硬件”修复这个问题(可能不是正确的 Stack Exchange 网站,因为不再与 Linux 相关)?
谢夫
这是我使用 xev 进行这些物理按键操作得到的结果:
- 按下LCtrl
- 按下LSHift
- 按下Left arrow
- 发布Left arrow
- 发布LShift
- 发布LCtrl
- 按下LCtrl
- 按下LSHift
- 按下Right arrow
- 发布Right arrow
- 发布LShift
- 发布LCtrl
dragon@kaliportable:~$ xev
Outer window is 0x3000001, inner window is 0x3000002
PropertyNotify event, serial 8, synthetic NO, window 0x3000001,
atom 0x27 (WM_NAME), time 4136398, state PropertyNewValue
PropertyNotify event, serial 9, synthetic NO, window 0x3000001,
atom 0x22 (WM_COMMAND), time 4136398, state PropertyNewValue
PropertyNotify event, serial 10, synthetic NO, window 0x3000001,
atom 0x28 (WM_NORMAL_HINTS), time 4136398, state PropertyNewValue
CreateNotify event, serial 11, synthetic NO, window 0x3000001,
parent 0x3000001, window 0x3000002, (10,10), width 50, height 50
border_width 4, override NO
PropertyNotify event, serial 14, synthetic NO, window 0x3000001,
atom 0x14e (WM_PROTOCOLS), time 4136402, state PropertyNewValue
MapNotify event, serial 15, synthetic NO, window 0x3000001,
event 0x3000001, window 0x3000002, override NO
ConfigureNotify event, serial 20, synthetic NO, window 0x3000001,
event 0x3000001, window 0x3000001, (0,0), width 178, height 178,
border_width 0, above 0x60000b, override NO
PropertyNotify event, serial 28, synthetic NO, window 0x3000001,
atom 0x1d1 (_NET_WM_ALLOWED_ACTIONS), time 4136402, state PropertyNewValue
ReparentNotify event, serial 29, synthetic NO, window 0x3000001,
event 0x3000001, window 0x3000001, parent 0x600f1f,
(0,0), override NO
PropertyNotify event, serial 29, synthetic NO, window 0x3000001,
atom 0x153 (_NET_FRAME_EXTENTS), time 4136413, state PropertyNewValue
ConfigureNotify event, serial 29, synthetic NO, window 0x3000001,
event 0x3000001, window 0x3000001, (10,37), width 178, height 178,
border_width 0, above 0x0, override NO
PropertyNotify event, serial 29, synthetic NO, window 0x3000001,
atom 0x1aa (_GTK_EDGE_CONSTRAINTS), time 4136413, state PropertyNewValue
PropertyNotify event, serial 31, synthetic NO, window 0x3000001,
atom 0x156 (_NET_WM_DESKTOP), time 4136421, state PropertyNewValue
PropertyNotify event, serial 32, synthetic NO, window 0x3000001,
atom 0x19b (WM_STATE), time 4136423, state PropertyNewValue
PropertyNotify event, serial 32, synthetic NO, window 0x3000001,
atom 0x15c (_NET_WM_STATE), time 4136423, state PropertyNewValue
PropertyNotify event, serial 32, synthetic NO, window 0x3000001,
atom 0x1aa (_GTK_EDGE_CONSTRAINTS), time 4136423, state PropertyNewValue
PropertyNotify event, serial 34, synthetic NO, window 0x3000001,
atom 0x1aa (_GTK_EDGE_CONSTRAINTS), time 4136428, state PropertyNewValue
ConfigureNotify event, serial 34, synthetic YES, window 0x3000001,
event 0x3000001, window 0x3000001, (48,104), width 178, height 178,
border_width 2, above 0x0, override NO
PropertyNotify event, serial 34, synthetic NO, window 0x3000001,
atom 0x1aa (_GTK_EDGE_CONSTRAINTS), time 4136442, state PropertyNewValue
PropertyNotify event, serial 34, synthetic NO, window 0x3000001,
atom 0x15c (_NET_WM_STATE), time 4136443, state PropertyNewValue
PropertyNotify event, serial 34, synthetic NO, window 0x3000001,
atom 0x1aa (_GTK_EDGE_CONSTRAINTS), time 4136443, state PropertyNewValue
MapNotify event, serial 34, synthetic NO, window 0x3000001,
event 0x3000001, window 0x3000001, override NO
VisibilityNotify event, serial 34, synthetic NO, window 0x3000001,
state VisibilityUnobscured
Expose event, serial 34, synthetic NO, window 0x3000001,
(0,0), width 178, height 10, count 3
Expose event, serial 34, synthetic NO, window 0x3000001,
(0,10), width 10, height 58, count 2
Expose event, serial 34, synthetic NO, window 0x3000001,
(68,10), width 110, height 58, count 1
Expose event, serial 34, synthetic NO, window 0x3000001,
(0,68), width 178, height 110, count 0
FocusIn event, serial 34, synthetic NO, window 0x3000001,
mode NotifyNormal, detail NotifyNonlinear
KeymapNotify event, serial 34, synthetic NO, window 0x0,
keys: 68 0 0 0 0 0 0 0 0 0 0 0 16 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PropertyNotify event, serial 34, synthetic NO, window 0x3000001,
atom 0x15c (_NET_WM_STATE), time 4136456, state PropertyNewValue
PropertyNotify event, serial 34, synthetic NO, window 0x3000001,
atom 0x1aa (_GTK_EDGE_CONSTRAINTS), time 4136456, state PropertyNewValue
PropertyNotify event, serial 34, synthetic NO, window 0x3000001,
atom 0x15c (_NET_WM_STATE), time 4136456, state PropertyNewValue
PropertyNotify event, serial 34, synthetic NO, window 0x3000001,
atom 0x1aa (_GTK_EDGE_CONSTRAINTS), time 4136456, state PropertyNewValue
KeyPress event, serial 34, synthetic NO, window 0x3000001,
root 0x116, subw 0x0, time 4137624, (610,103), root:(660,209),
state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x3000001,
root 0x116, subw 0x0, time 4138162, (610,103), root:(660,209),
state 0x14, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3000001,
root 0x116, subw 0x0, time 4139610, (610,103), root:(660,209),
state 0x15, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3000001,
root 0x116, subw 0x0, time 4140217, (610,103), root:(660,209),
state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x3000001,
root 0x116, subw 0x0, time 4140814, (610,103), root:(660,209),
state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x3000001,
root 0x116, subw 0x0, time 4141468, (610,103), root:(660,209),
state 0x14, 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 0x116, subw 0x0, time 4142038, (610,103), root:(660,209),
state 0x15, keycode 114 (keysym 0xff53, Right), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3000001,
root 0x116, subw 0x0, time 4142177, (610,103), root:(660,209),
state 0x15, keycode 114 (keysym 0xff53, Right), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3000001,
root 0x116, subw 0x0, time 4142837, (610,103), root:(660,209),
state 0x15, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3000001,
root 0x116, subw 0x0, time 4143460, (610,103), root:(660,209),
state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
FocusOut event, serial 37, synthetic NO, window 0x3000001,
mode NotifyNormal, detail NotifyNonlinear
PropertyNotify event, serial 37, synthetic NO, window 0x3000001,
atom 0x15c (_NET_WM_STATE), time 4145868, state PropertyNewValue
PropertyNotify event, serial 37, synthetic NO, window 0x3000001,
atom 0x1aa (_GTK_EDGE_CONSTRAINTS), time 4145869, state PropertyNewValue
^C
简而言之,似乎什么Left arrow也没做,同时按下right arrow(在两种情况下都按住 LCtrl+LShift)生成了一些事件。