I've tried
RUNDLL32.EXE USER32.DLL,SwapMouseButton
But it doesn't work, even when run as administrator.
My goal is to make a .bat file that I can call via my fancy shmancy new mouse I bought that allows me to call any arbitrary command from a mouse click.
Answer
Swap mouse buttons from command line
We can swap mouse buttons by editing the registry value
SwapMouseButtons
under the registry keyHKEY_CURRENT_USER\Control Panel\Mouse
. To swap mouse buttons we need to set its value to1
.Same thing can be done from command line using the below command.
reg add "HKEY_CURRENT_USER\Control Panel\Mouse" /v SwapMouseButtons /t REG_SZ /d 1
It requires a logoff or reboot to make the changes effective.
Reference Swap mouse buttons from command line:
Alternative Solution
How do I use Rundll32 to swapmousebutton? for a C# solution (requires the .NET Framework Runtime to be installed)
No comments:
Post a Comment