HAL policy file:/etc/hal/fdi/policy/mouse-wheel.fdi
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="info.product" string="Logitech USB Trackball">
<merge key="input.x11_options.ButtonMapping" type="string">1 2 3 4 5 6 7 8 9</merge>
<merge key="input.x11_options.EmulateWheel" type="string">true</merge>
<merge key="input.x11_options.EmulateWheelButton" type="string">9</merge>
<merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge>
<merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
<merge key="input.x11_options.Emulate3Buttons" type="string">true</merge>
</match>
</device>
</deviceinfo>
Right-handed configuration
left large button: left-click
left small button: scroll-wheel enabler
right small button: middle-click
right large button: right-click
execute when X starts:
/usr/bin/xinput set-button-map "Logitech USB Trackball" 1 9 3 4 5 6 7 8 2
Left-handed configuration
left large button: right-click
left small button: middle-click
right small button: scroll-wheel enabler
right large button: left-click
execute when X starts:
/usr/bin/xinput set-button-map "Logitech USB Trackball" 1 9 3 4 5 6 7 2 8
Since I use Gnome, I usually put these commands in a script and add it to Gnome's Startup Applications.
Thanks for the code.I will try it out.
ReplyDelete