我最近安装了 Ubuntu 21.10,并且使用拉丁美洲布局键盘。我注意到,每当我想使用需要按两次按键的特殊字符时,它都会在第一个事件后显示预览。例如:
第二个事件发生后,显示正常。这种行为会扰乱任何文本自动包含在一对字符之间的软件。例如,在WebStorm、VSCode等中,当我需要在`之间包含一段代码时,第一个按键事件会删除所选文本。
有什么办法可以改变这个吗?
编辑
使用xev
我按下Alt gr
+ ^
,释放^
,按下^
然后释放。
KeyPress event, serial 34, synthetic NO, window 0x6c00001,
root 0x1e5, subw 0x0, time 34853384, (321,160), root:(4261,846),
state 0x10, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XKeysymToKeycode returns keycode: 92
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x6c00001,
root 0x1e5, subw 0x0, time 34853545, (321,160), root:(4261,846),
state 0x90, keycode 48 (keysym 0xfe52, dead_circumflex), same_screen YES,
XLookupString gives 1 bytes: (5e) "^"
XmbLookupString gives 0 bytes:
XFilterEvent returns: True
KeyRelease event, serial 37, synthetic NO, window 0x6c00001,
root 0x1e5, subw 0x0, time 34853656, (321,160), root:(4261,846),
state 0x90, keycode 48 (keysym 0xfe52, dead_circumflex), same_screen YES,
XLookupString gives 1 bytes: (5e) "^"
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x6c00001,
root 0x1e5, subw 0x0, time 34853847, (321,160), root:(4261,846),
state 0x90, keycode 48 (keysym 0xfe52, dead_circumflex), same_screen YES,
XLookupString gives 1 bytes: (5e) "^"
XmbLookupString gives 0 bytes:
XFilterEvent returns: True
KeyPress event, serial 37, synthetic NO, window 0x6c00001,
root 0x1e5, subw 0x0, time 34853847, (321,160), root:(4261,846),
state 0x90, keycode 0 (keysym 0x5e, asciicircum), same_screen YES,
XKeysymToKeycode returns keycode: 15
XLookupString gives 0 bytes:
XmbLookupString gives 1 bytes: (5e) "^"
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x6c00001,
root 0x1e5, subw 0x0, time 34853932, (321,160), root:(4261,846),
state 0x90, keycode 48 (keysym 0xfe52, dead_circumflex), same_screen YES,
XLookupString gives 1 bytes: (5e) "^"
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x6c00001,
root 0x1e5, subw 0x0, time 34854065, (321,160), root:(4261,846),
state 0x90, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
XKeysymToKeycode returns keycode: 92
XLookupString gives 0 bytes:
XFilterEvent returns: False