2012-12-10 104 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?

謝謝!

回答