2012-12-10 52 views
2

我问这个已经在unix.stackexchange但至今没有运气,所以我在这里张贴。希望有人知道答案。xmodmap的按键事件到ButtonPress事件

我只是得到了罗技T400鼠标,一切运作良好,但我要重新映射鼠标实际鼠标功能的“顶部”的一部分。

当我运行xev的,并捕获点击,所有的鼠标按键返回ButtonPress/ButtonRelease事件,但中间按钮的顶部返回一个按键/ KeyRelease事件为:

KeyPress event, serial 35, synthetic NO, window 0x5200001, 
root 0x31d, subw 0x0, time 630089839, (80,128), root:(2871,588), 
state 0x10, keycode 133 (keysym 0x31d, (no name)), same_screen YES, 
XLookupString gives 0 bytes: 
XmbLookupString gives 0 bytes: 
XFilterEvent returns: False 

KeyRelease event, serial 36, synthetic NO, window 0x5200001, 
root 0x31d, subw 0x0, time 630089983, (80,128), root:(2871,588), 
state 0x50, keycode 133 (keysym 0x31d, (no name)), same_screen YES, 
XLookupString gives 0 bytes: 
XFilterEvent returns: False 

的底部中间按钮做工精细,并返回:

ButtonPress event, serial 37, synthetic NO, window 0x5200001, 
root 0x31d, subw 0x0, time 630137726, (10,171), root:(2801,631), 
state 0x10, button 2, same_screen YES 

ButtonRelease event, serial 37, synthetic NO, window 0x5200001, 
root 0x31d, subw 0x0, time 630138960, (10,171), root:(2801,631), 
state 0x210, button 2, same_screen YES 

我想重新映射顶部的方式与底部相同,这可能使用xmodmap?

谢谢!

回答