Thursday, July 23, 2009

Setting a Lefty and a Righty Mouse in Linux at the Same Time

If you want to use two mouses in Linux, and want one of them lefty and the other righty: use this:

xinput set-button-map 2 3 2 1
will reverse the buttons of the mouse numbered 2. To get a list of the mouses,
xinput list
or
xsetpointer -l

Combining both, to set the Microsoft mouse as lefty for example, use:

xinput set-button-map `xsetpointer -l|grep Microsoft|cut -c 1` 3 2 1

This is not persistent across sessions.

No comments: