I use a right-handed usb mouse in the office and a left-handed usb mouse at home on the same Ubuntu 11.04 laptop. How can I configure the one at home to be automatically set up to left-handed when plugged in?
TutorialOpen up a terminal, and create a folder within your /etc/X11/ directory called xorg.conf.d and navigate to it:
Within this folder, make a file called 00-mouse-remap.conf, so bust open a text editor:
The X Server should scan this directory for custom X11 scripts to load up at boot time. So the next step is to copy a config setting similar to this into the 00-mouse-remap.conf file you have just opened (customise to your will):
Since this is mapped for a specific product, you should have separate configurations for your left and right handed mice. :P You can find the name of your device by entering in to terminal:
You will then need to edit a GConf entry within the editor, so run (in terminal or type it into a run session using ALT+F2):
And navigate to this entry, and uncheck the box next to the entry that says active:
Just be aware, that this disables the Gnome mouse pointer settings for when you modify your pointer settings within the GUI. So if you want to use the Mouse Settings GUI, you'll have to reactivate this - although, it could take over your new lefty settings. ^^ ExamplesFor example, my xinput list is:
So I would configure my 00-mouse-remap.conf to look like so:
References: |
|||||
|
