所以我想将我的 less(<) 键之一绑定(bind)为 Shift,因为它就在控制键上方,而且它会很方便,因为它就在 Ctrl 键上方。但是这个键与 less 具有相同的键码,当我按 ','+Shift 时会出现该键码。
shift+','xev 输出:
KeyRelease event, serial 37, synthetic NO, window 0x1a00001,
root 0xc4, subw 0x0, time 1185360, (-132,-64), root:(462,254),
state 0x1, keycode 59 (keysym 0x3c, less), same_screen YES,
XKeysymToKeycode returns keycode: 94
XLookupString gives 1 bytes: (3c) "<"
XFilterEvent returns: False
“<”按钮 xev 输出:
KeyRelease event, serial 37, synthetic NO, window 0x1a00001,
root 0xc4, subw 0x0, time 1267856, (-247,180), root:(347,498),
state 0x0, keycode 94 (keysym 0x3c, less), same_screen YES,
XLookupString gives 1 bytes: (3c) "<"
XFilterEvent returns: False
最佳答案
不,它们没有相同的键码。前者的键码是59,后者是94。
要将键码 94 用作右移,请使用此 xmodmap 脚本:
keycode 94 = Shift_R
add shift = Shift_R
关于linux - 绑定(bind)具有相同 key 代码的 key ,不会丢失第二个 key ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31086670/