如何重新映射鼠标键? (特例)

如何重新映射鼠标键? (特例)

我重新映射了 2 个鼠标按钮,#4 和 #7。现在它们被用作“Home”和“End”键,在 Firefox 中非常有用。
很遗憾我的鼠标上所有额外的键都与键盘上的数字键相同请注意,我指的不是数字键盘,所以现在如果我按键盘上的 4 键,就像按鼠标上的 4 键或键盘上的“Home”键一样。

xev 确认了以上所有内容
这是当我按下 4 号鼠标按钮时:

KeyPress event, serial 41, synthetic NO, window 0x4a00001, 
root 0x78a, subw 0x0, time 2268616, (164,-23), root:(1035,458), 
state 0x10, keycode 13 (keysym 0x34, 4), same_screen YES, 
XLookupString gives 1 bytes: (34) "4" 
XmbLookupString gives 1 bytes: (34) "4" 
XFilterEvent returns: False

这是当我按下数字 4 键盘按钮时:

KeyRelease event, serial 40, synthetic NO, window 0x3200001,
root 0x78a, subw 0x0, time 3661443, (169,-15), root:(1040,466),
state 0x10, keycode 13 (keysym 0x34, 4), same_screen YES,
XLookupString gives 1 bytes: (34) "4"
XFilterEvent returns: False

如你看到的按鼠标4键或键盘4键是一样的

我想了解如果可以在上游重新映射鼠标键,这样即使 xev 也会产生与当前代码不同的代码。

相关内容