Are there any alternatives to swap left/right mouse buttons except control panel->Mouse
I started to use the mouse with my left hand some years ago. It didn't take me that long to learn - a couple of weeks. Since then I've started to get problems with my right shoulder.
Ever since I use the mouse on the left side and also has the buttons swapped. Now that does not work well when accessing my computer using Remote Desktop on a computer with the mouse on the right side.
Also my primary computer at work has two mouses attached, one on USB and the other via PS/2. It would be nice to configure the left one to have buttons swapped and the right one to be normal. That way I could work both ways.
Is there a way to configure the driver or are there an enhanced driver available that lets me control this per mouse rather than set the swap left/right globally in the Windows UI.
Solution 1:
You can use X-Mouse Button Control to swap the mouse buttons.
X-Mouse Button Control does its changes by intercepting clicks, so they carry downstream to any Remote Desktop session. But I don't think it has per-mouse settings.
Solution 2:
Microsoft Intellipoint mouse drivers handle the swap buttons feature in a different way to the standard mouse drivers, and remote desktop works correctly: A left-click on the physically-connected mouse is sent to the remote machine as a right-click. And when connecting to the machine from elsewhere, Intellipoint does not swap buttons.
However, the Intellipoint software does not swap the buttons over on a non-Intellipoint mouse. So, my home workstation has an Intellipoint mouse to the left of the keyboard, and the supplied Dell mouse to the right of the keyboard. Works a treat, for both left- and right-handed users.
My work PC has two Dell mice, and is running XP. Fortunately the mice have different hardware IDs, so I've modified an .inf file in the Intellipoint driver's installer, and convinced it that one of the mice was made by Microsoft.
However, I wasn't able to get this to work under Win7 last time I tried, so when my new work PC arrives I shall probably buy a Microsoft mouse to go with it.
One gotcha: You have to turn the standard "swap buttons" function off before installing Intellipoint. Otherwise when you remote desktop to that PC from elsewhere, the buttons get swapped.
It's possible that 3rd-party mouse drivers will also work better than the standard drivers.
Solution 3:
A hardware alternative may be a gaming mouse. I have found this SteelSeries mouse that claims to be ambidextrous and driverless. I guess you can swap left/right buttons by clicking another button.
Beware that I haven't tried it myself and it's expensive compared to a normal mouse. I wonder if modifying a normal mouse is worth the saving.
Solution 4:
I think EitherMouse deserves to be mentioned here. I'm very happy with it when I have to use a Windows box. It makes managing a multi-mouses setup a breeze.
You can download the tool at its website: http://www.eithermouse.com/
For posterity's sake, I'll include the solution for GNU/Linux here as well. The best way, in my opinion, is to define a custom Xorg InputClass section config. This will be in effect anytime the mouse is detected. Here's my configuration file /etc/X11/xorg.conf.d/50-mouses-config.conf
:
Section "InputClass"
Identifier "Lachesis Left Handed"
MatchUSBID "1532:000c"
Option "ButtonMapping" "3 2 1"
EndSection
The Identifier
value is unimportant. The USB ID can found using the lsusb
command. To see which buttons are available, the xev
tool can be used to get the button ID as you press the buttons of your mouse. The command xinput list
can be used to get a list of all the input devices on your system, and their xinput ID. You can a complete list of the buttons of the device using the command xinput get-button-map N
, where N is your device's xinput ID, such as xinput get-button-map 10
. You can experiment modifying the mapping of the buttons of your device using the xinput set-button-map N *mapping*
command, such as: xinput set-button-map 10 3 2 1
You will have to restart your X session to make your new Xorg configuration effective. In case of problem, the Xorg.log (tail -f /var/log/Xorg.0.log
) might give you a clue as to what went wrong.
An xinput set-button-map
alternative can be used, but is less dynamic (it will not be applied automatically when your device is detected). The following script can be configured to run at startup (in Ubuntu there is a Startup Applications GUI to set it up). For some reasons it won't work if you simply call the script from your ~/.profile file. The MOUSE_NAME variable corresponds to whatever name is given to your mouse in the output of the xinput list
command.
#!/bin/bash
MOUSE_NAME="Razer Razer Lachesis"
BUTTONS_MAP="3 2 1"
while read -r line; do
raw_line=$(grep "$MOUSE_NAME" | grep "pointer")
if [ ! -z "$raw_line" ]; then
mouse_id=$(echo "$raw_line" | cut -d '=' -f2 | sed 's/\t.*//g')
echo "Found ${MOUSE_NAME}'s id: $mouse_id"
xinput set-button-map $mouse_id $BUTTONS_MAP
break
fi
done < <(xinput list)