1、打开终端,执行 xev 命令

2、按下键盘上反斜杠(\)或者(|)(同一个键),查看返回的keycode,在我的笔记本上返回的是132;

KeyRelease event, serial 37, synthetic NO, window 0x6600001,
    root 0x102, subw 0x0, time 3305387, (271,281), root:(341,417),
    state 0x0, keycode 132 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

3、使用 xmodmap 命令修改键盘映射:xmodmap -e "keycode 132 = backslash bar"

修改完毕,即可输入。

(如果相关命令软件未安装,则需要先进行安装!)

Last modification:July 5, 2020
If you think my article is useful to you, please feel free to appreciate