由于某些无法解释的原因,我的 Ubuntu 系统上的大写d键不再产生输出。按下 caps lock 然后按 d 会产生 D。我试过多个键盘,问题都一样。在系统 > 首选项 > 键盘快捷键下没有任何与Shift+绑定的d内容。xev 产生以下内容:
shift+a
KeyPress event, serial 36, synthetic NO, window 0x4c00001,
root 0x27a, subw 0x0, time 31268952, (130,-16), root:(1000,525),
state 0x10, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 36, synthetic NO, window 0x4c00001,
root 0x27a, subw 0x0, time 31269376, (130,-16), root:(1000,525),
state 0x11, keycode 38 (keysym 0x41, A), same_screen YES,
XLookupString gives 1 bytes: (41) "A"
XmbLookupString gives 1 bytes: (41) "A"
XFilterEvent returns: False
KeyRelease event, serial 36, synthetic NO, window 0x4c00001,
root 0x27a, subw 0x0, time 31269584, (130,-16), root:(1000,525),
state 0x11, keycode 38 (keysym 0x41, A), same_screen YES,
XLookupString gives 1 bytes: (41) "A"
XFilterEvent returns: False
KeyRelease event, serial 36, synthetic NO, window 0x4c00001,
root 0x27a, subw 0x0, time 31269608, (130,-16), root:(1000,525),
state 0x11, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
shift+d
KeyPress event, serial 36, synthetic NO, window 0x4c00001,
root 0x27a, subw 0x0, time 31102792, (115,-13), root:(985,528),
state 0x10, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
FocusOut event, serial 36, synthetic NO, window 0x4c00001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 36, synthetic NO, window 0x4c00001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 36, synthetic NO, window 0x0,
keys: 2 0 0 0 0 0 0 64 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
KeyRelease event, serial 36, synthetic NO, window 0x4c00001,
root 0x27a, subw 0x0, time 31103104, (115,-13), root:(985,528),
state 0x11, keycode 62 (keysym 0xffe2, Shift_R), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
答案1
FocusOut 和 FocusIn 事件意味着焦点被其他东西夺走。很可能您已将Shift-D其指定为某种窗口管理器热键。
检查您的窗口管理器键绑定并找到有问题的条目,然后您就应该没问题了。