I see that I can configure mouse and touchpad all in one panel (Ubuntu 13.10, defaults, Gnome). Which is to some extend. Namely, I want to have the touchpad differently configured then the mouse and …
When I have an (USB) mouse attached I use it normally left-handed. Therefore I switch the buttons to left-handed. But when I use the touchpad I feel little bit lost with that kind of configuration. Therefore I wanna have it right-handed.
Is there a way to achieve the following: when I plugin a mouse (respectively when it is detected) automatically switch to left-handed and when I unplug it, switch automatically to right-handed?
Best Answer
I understand your frustration, but this problem can be solved very simple with the help of
xinput
tool.First plug in your USB mouse, then run the following command:
to see the
id
of your mouse. The output of above command it can be similar to:In the above example the USB mouse has
id=11
. We will use thisid
in the following command which will swap buttons to be left handed only for the USB mouse (and not for tauchpad):In general:
To revert the change, use:
To make the change permanently, add the following command at Startup Applications (search in Dash for Startup Applications):
Update:
Since the id might change after reboot but the name of the USBmouse not, you could also grep for the name of the mouse and apply it. To skip the details reg. picking out the name the final solution looks like:
pack it into the above mentioned Startup Applications you'll get finally: