按下 Ctrl+Alt+Shift 时,系统仅注册两个键。在 IntelliJ IDEA 等 IDE 中工作时,这非常不方便。有解决方法吗?
FocusIn event, serial 21, synthetic NO, window 0x7000001,
mode NotifyNormal, detail NotifyNonlinear
KeymapNotify event, serial 21, synthetic NO, window 0x0,
keys: 0 0 0 0 16 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
PropertyNotify event, serial 21, synthetic NO, window 0x7000001,
atom 0x147 (_NET_FRAME_EXTENTS), time 4648350, state PropertyNewValue
PropertyNotify event, serial 21, synthetic NO, window 0x7000001,
atom 0x150 (_NET_WM_STATE), time 4648350, state PropertyNewValue
PropertyNotify event, serial 22, synthetic NO, window 0x7000001,
atom 0x150 (_NET_WM_STATE), time 4648351, state PropertyNewValue
PropertyNotify event, serial 33, synthetic NO, window 0x7000001,
atom 0x1a0 (_NET_WM_ICON_GEOMETRY), time 4648358, state PropertyNewValue
KeyRelease event, serial 34, synthetic NO, window 0x7000001,
root 0x1e9, subw 0x0, time 4648396, (429,225), root:(3197,689),
state 0x10, keycode 36 (keysym 0xff0d, Return), same_screen YES,
" XLookupString gives 1 bytes: (0d) "
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x7000001,
root 0x1e9, subw 0x0, time 4651118, (429,225), root:(3197,689),
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 0x7000001,
root 0x1e9, subw 0x0, time 4651193, (429,225), root:(3197,689),
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 0x7000001,
root 0x1e9, subw 0x0, time 4651195, (429,225), root:(3197,689),
state 0x15, keycode 64 (keysym 0xfe08, ISO_Next_Group), same_screen YES,
XKeysymToKeycode returns keycode: 50
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x7000001,
root 0x1e9, subw 0x0, time 4651256, (429,225), root:(3197,689),
state 0x2015, keycode 38 (keysym 0x41, A), same_screen YES,
XLookupString gives 1 bytes: (01) ""
XmbLookupString gives 1 bytes: (01) ""
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x7000001,
root 0x1e9, subw 0x0, time 4651376, (429,225), root:(3197,689),
state 0x2015, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x7000001,
root 0x1e9, subw 0x0, time 4651378, (429,225), root:(3197,689),
state 0x2011, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x7000001,
root 0x1e9, subw 0x0, time 4651387, (429,225), root:(3197,689),
state 0x2010, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x7000001,
root 0x1e9, subw 0x0, time 4651387, (429,225), root:(3197,689),
state 0x2010, keycode 38 (keysym 0x61, a), same_screen YES,
XLookupString gives 1 bytes: (61) "a"
XFilterEvent returns: False
ClientMessage event, serial 37, synthetic YES, window 0x7000001,
message_type 0x142 (WM_PROTOCOLS), format 32, message 0x139 (WM_DELETE_WINDOW)
答案1
我想到了。问题是 Alt+Shift 快捷键被识别为Next Group
用于键盘布局切换的特殊键。我不知道如何更改布局切换的快捷方式,但我设法找到一种方法来删除它。
/etc/default/keyboard
使用文本编辑器打开并grp:alt_shift_toggle
从 XKBOPTIONS 中删除。就我而言,我必须更改这一行:
XKBOPTIONS="grp:alt_shift_toggle,grp_led:scroll,terminate:ctrl_alt_bksp"
到
XKBOPTIONS="grp_led:scroll,terminate:ctrl_alt_bksp"
然后重新启动(我确信还有另一种方法,但重新启动是最简单的)。现在 Alt+Shift 将不会被识别为Next Group
.