我拥有一台Razer Naga Mouse,essentaly它旁边有一个小小的小键盘.我想将这些密钥重新映射到不同的未使用的密钥或bash命令.我可以通过使用xev来获取密钥代码(例如鼠标上的"1"是键代码87),然后我可以使用xmodmap将密钥代码绑定到不同的密钥.
然而,我的键盘上的小键盘也会继承这个,因为键码是相同的,我注意到的是"串行"是不同的.
例如,按下鼠标键盘上的"1"按钮时,这是xev的输出.
KeyPress event, serial 34, synthetic NO, window 0x1c00001,
root 0x1ae, subw 0x0, time 2179878, (170,-2), root:(198,345),
state 0x0, keycode 87 (keysym 0xff9c, KP_End), same_screen YES,
XLookupString gives 0 bytes: 
XmbLookupString gives 0 bytes: 
XFilterEvent returns: False
KeyRelease event, serial 35, synthetic NO, window 0x1c00001,
root 0x1ae, subw 0x0, time 2179966, (170,-2), root:(198,345),
state 0x0, keycode 87 (keysym 0xff9c, KP_End), same_screen YES,
XLookupString gives 0 bytes: 
XFilterEvent returns: False
这是我的键盘小键盘上按"1"时的输出
KeyPress event, serial 35, …