Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

We have both left-handed and right-handed users in our house. It would be handy to be able to change this setting from the keyboard rather than using the Mouse control panel. Is there a way to assign a keyboard combination to this function?

Edit: I realized after a few answers came in that some of the answers aren't working because of the Synaptics software that came with my HP Netbook. This software (or maybe something else, not sure) modifies my mouse control panel to look like this:

Mouse Properties

share|improve this question
    
What Windows version are you using? –  Ivo Flipse Jan 20 '10 at 19:15
    
@Ivo, it's in the tags. –  John T Jan 20 '10 at 19:17

4 Answers 4

up vote 3 down vote accepted
+100

Another AutoHotkey approach:

^!s::
run main.cpl
RegRead, swapped, HKEY_CURRENT_USER, Software\Synaptics\SynTPCpl\TouchPadPS2_3, SwapMouseButtons
WinWait,Mouse Properties
if (swapped = 1)
{
    RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Synaptics\SynTPCpl\TouchPadPS2_3, SwapMouseButtons, % !swapped
    Send {TAB}{R}{A}{Enter}

}
else
{
    RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Synaptics\SynTPCpl\TouchPadPS2_3, SwapMouseButtons, % !swapped
    Send {TAB}{L}{A}{Enter}
}
return

Ctrl + Alt + s will toggle the button swap.

After installing AutoHotkey, run it; you'll get a dialog to make a script:

enter image description here

Hit Yes and paste the above code into the file, save it. Now run AutoHotkey again so it sits in your tray. It will now listen for the key combinations above until you right-click its tray icon and exit it.

share|improve this answer
    
You get an upvote for an AutoHotKey script that works, and the explanation of how to use it (which would have saved me time on the other autoHotKey example). I also like the fact that this doesn't open the mouse control panel. I'm keeping the bounty open for now because ideally I'd like to use the same key combination to swap the mouse buttons and to return to the default state. –  davidcl Jan 20 '10 at 18:47
1  
Oh you want a toggle? no problem! answer updated. I think the new approach is better anyways as it updates the registry as well. Some applications may rely on this key to check your mouse settings, so this will give them the correct reading on your current settings. –  John T Jan 20 '10 at 18:55
    
Okay, that works on my Vista machine at work. Unfortunately it still doesn't work on the Netbook where I really want it (that's the computer my left-handed daughter uses). I think I figured out why this and other solutions aren't working, and I'm going to update the question accordingly. –  davidcl Jan 20 '10 at 19:20
    
However, thank you for this! I can tell I need to learn more about AutoHotKey and I really like your elegant use of it to solve this problem. –  davidcl Jan 20 '10 at 19:21
1  
Just to summarize the offline discussion here: the Synaptics software seems to do a ton of stuff and although it does store the setting in a registry key, simply updating that key isn't enough to switch the buttons. There wasn't a clear DLL call to change the buttons either. So we returned to the mouse control panel approach. The accepted answer uses the Synaptics registry key as a toggle so it knows what to do in the mouse control panel. It works great, but it's specific to this particular configuration with a Synaptics trackpad. –  davidcl Jan 21 '10 at 14:36

SwapMouseButtons is a utility program for quickly switching the mouse button assignment between left-handed and right-handed modes. Just press CTRL + F12 on the keyboard to switch.

enter image description here

It's useful for families, schools, libraries, or anywhere left-handed and right-handed people share a computer. The key used to switch can be configured to any key or key combination.

SwapMouseButtons is freeware.

share|improve this answer
    
This looked promising, but the program didn't work for me. –  davidcl Jan 11 '10 at 19:48
    
works a treat for me in Windows XP SP3 and Windows 7 x86 with a normal 2 button mouse. –  Molly7244 Jan 11 '10 at 20:08
    
Probably this works fine for anyone who doesn't have this blasted Synaptics trackpad software. –  davidcl Jan 20 '10 at 21:05
    
@davidcl - it wasn't clear from your original post that we're dealing with a laptop ... have you tried this with a 'real' mouse? –  Molly7244 Jan 20 '10 at 21:40

Sounds like a job for Autohotkey.

Something like:

^!c::
run main.cpl
WinWait ahk_class #32770
Send {Tab3}{Left}{Tab}{Space}{Enter}
return

To have Ctrl + Alt + C make the change. You'll need to adapt it a little for your set up.

Edit- This is closer, but still not quite perfect. My Dell touchpad utility might be getting in the way. Thanks for tips people

share|improve this answer
    
what keyboard combination changes mouse settings? –  RJFalconer Jan 9 '10 at 21:20
    
Sounds promising. I've messed with AutoHotKey before but haven't used it too extensively. I'll give it a try. –  davidcl Jan 11 '10 at 19:50
1  
You'll probably want to throw a WinWait in there, as AutoHotkey doesn't care if the window opens fast enough, it will start sending the keys regardless. –  John T Jan 20 '10 at 4:38
    
@John T: That's helpful, but the main issue with this AHK script turns out to be a syntax error in the first line (since it is a multi-line script the run command should be on a separate line from the hotkey. If someone would like to edit this response or create a new one with a complete working AHK script along with instructions for use, I'll award the bounty to that answer. –  davidcl Jan 20 '10 at 17:40

I have both a right handed and a Logitech left-handed mouse installed. The left-handed mouse is automatically configured backwards. When you use it, the buttons are reversed, so that it operates correctly. No mucking with control panel is required!

share|improve this answer
    
This is a netbook, so we're really concerned about modifying the behavior of the built-in trackpad. Installing additional mice isn't really an option! –  davidcl Jan 11 '10 at 19:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.