首先先找出滑鼠按鍵的定義:
xev | grep button
書面上會出現白色方框,把遊標移入方框內按下想查詢的滑鼠按鍵如:
將定義成page down的button:
state 0x10, button 8, same_screen YES
state 0x10, button 8, same_screen YES
將定義成page up
state 0x10, button 9, same_screen YES
state 0x10, button 9, same_screen YES
安裝package:
sudo apt-get install imwheel
編輯啟始檔:
sudo vi /etc/X11/imwheel/startup.conf
IMWHEEL_START=1
IMWHEEL_PARAMS='-b "0 0 0 0 8 9 10 11 12"'
編輯設定檔加入這幾行: ImWheel to assign button 8 to action Thumb1, button 9 to action Thumb2
sudo vi /etc/X11/imwheel/imwheelrc
".*"
None, Thumb1, Down, Page_Down
None, Thumb2, Up, Page_Up
最後在console下找個視窗測試定義好的按鍵。
sudo imwheel -k
技術來源參考連結
http://www.gdargaud.net/Hack/LinuxMouse.html
沒有留言:
張貼留言