gnome-terminal:Alt 键上的奇怪控制字符

Stu*_*uck 7 keyboard gnome-terminal control-characters

我可能配置错误,但我不知道是什么。(请参阅下面的更新 1 和 2)在 中gnome-terminal,当我点击Alt(没有任何其他键)时,它会立即发送^[<到终端(我通过点击Ctrl+V之前进行了测试Alt)。由于我经常使用Alt+ Tab,这是非常不幸的,因为控制序列会,例如,移动到历史的开头或在vim. 该Alt+ Tab,然而,这仍然可以通过窗口工作,并循环通缉。

可能是什么原因以及如何恢复 gnome-terminal 中的默认行为?

  • 操作系统:Linux Mint 19.3 Tricia x86_64
  • 内核:5.3.0-24-generic
  • 外壳:bash 4.4.20
  • GNOME 终端 3.28.1 使用 VTE 0.52.2 +GNUTLS -PCRE2

更新 1

我发现这仅发生在笔记本电脑键盘本身上,而不是使用外部连接的 USB 键盘。虽然连接了外部键盘,但两个 -Alt键的行为不同。

笔记本电脑是联想P53。

我仍然不知道如何为笔记本电脑键盘修复它,但至少我更接近问题的根源。

更新 2 运行xev我很快击中(按下并立即释放)Alt一次;首先在笔记本电脑键盘上,然后在外部 USB 键盘上:

# LAPTOP KEYBOARD ALT-KEY

MappingNotify event, serial 39, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 39, synthetic NO, window 0x6a00001,
    root 0x2b6, subw 0x0, time 9398319, (162,-8), root:(903,449),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 39, synthetic NO, window 0x6a00001,
    root 0x2b6, subw 0x0, time 9398319, (162,-8), root:(903,449),
    state 0x18, keycode 94 (keysym 0x3c, less), same_screen YES,
    XLookupString gives 1 bytes: (3c) "<"
    XmbLookupString gives 1 bytes: (3c) "<"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x6a00001,
    root 0x2b6, subw 0x0, time 9398360, (162,-8), root:(903,449),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x6a00001,
    root 0x2b6, subw 0x0, time 9398360, (162,-8), root:(903,449),
    state 0x10, keycode 94 (keysym 0x3c, less), same_screen YES,
    XLookupString gives 1 bytes: (3c) "<"
    XFilterEvent returns: False

# EXTERNAL USB KEYBOARD ALT-KEY

MappingNotify event, serial 40, synthetic NO, window 0x0,
    request MappingKeyboard, first_keycode 8, count 248

KeyPress event, serial 40, synthetic NO, window 0x6a00001,
    root 0x2b6, subw 0x0, time 9402608, (162,-8), root:(903,449),
    state 0x10, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 41, synthetic NO, window 0x6a00001,
    root 0x2b6, subw 0x0, time 9402704, (162,-8), root:(903,449),
    state 0x18, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Run Code Online (Sandbox Code Playgroud)

更新 3

这可能是硬件缺陷(请参阅评论和答案)。我将从制造商那里得到一个新键盘。

Stu*_*uck 2

这是硬件缺陷,并已得到制造商的确认。更换键盘解决了这个问题。感谢您帮忙调查!