Fedora

禁用鍵碼序列的 unicode 解釋

  • March 13, 2020

輸入字元組合^時,2(一個接一個,而不是同時)我沒有得到這兩個字元,而是 Unicode point U+00B2,又名². ^, 4 => U+2074=>等也是如此。我的語言環境設置為英語,同時使用德語鍵盤。我想保留正常的字元行為,例如直接輸入 ä,ö,ü,ß,但禁用多鍵碼序列的解釋。

我使用 GNOME 3.34.4 執行 Fedora 31(工作站版)。

有誰如何禁用這種解釋?

編輯:輸入xev時的輸出^2

KeyPress event, serial 34, synthetic NO, window 0x800001,
   root 0x2cd, subw 0x0, time 33006949, (941,-29), root:(1091,183),
   state 0x10, keycode 49 (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 0x800001,
   root 0x2cd, subw 0x0, time 33007045, (941,-29), root:(1091,183),
   state 0x10, keycode 49 (keysym 0xfe52, dead_circumflex), same_screen YES,
   XLookupString gives 1 bytes: (5e) "^"
   XFilterEvent returns: False

KeyPress event, serial 37, synthetic NO, window 0x800001,
   root 0x2cd, subw 0x0, time 33007677, (941,-29), root:(1091,183),
   state 0x10, keycode 11 (keysym 0x32, 2), same_screen YES,
   XLookupString gives 1 bytes: (32) "2"
   XmbLookupString gives 1 bytes: (32) "2"
   XFilterEvent returns: True

KeyPress event, serial 37, synthetic NO, window 0x800001,
   root 0x2cd, subw 0x0, time 33007677, (941,-29), root:(1091,183),
   state 0x10, keycode 0 (keysym 0xb2, twosuperior), same_screen YES,
   XKeysymToKeycode returns keycode: 11
   XLookupString gives 0 bytes: 
   XmbLookupString gives 2 bytes: (c2 b2) "²"
   XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x800001,
   root 0x2cd, subw 0x0, time 33007781, (941,-29), root:(1091,183),
   state 0x10, keycode 11 (keysym 0x32, 2), same_screen YES,
   XLookupString gives 1 bytes: (32) "2"
   XFilterEvent returns: False

這可以解決問題:

gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'de+nodeadkeys')]"

在那'de'之前,缺少這個+nodeadkeys部分。

引用自:https://unix.stackexchange.com/questions/572705