Disable the Right Mouse Button?

Dear Lifehacker,
I’ve been searching around for a solution to disabling the right mouse button for my son, Xander (4), who gets very frustrated when he inadvertently mashes the right button. There’s a shareware program out there that fits the bill, but I’m hoping that there is a freeware program, or some other solution that will completely disable the right button for when he is logged in.
Yours,
Too-Many-Buttons

Dear Buttons,
Whipping together a script and simple program to disable the right-click button on your mouse is a breeze using AutoHotkey. Hit the jump to see how and to download the KillRightClick script and executable.


First, let’s take a look at the script that makes it happen. It’s really just a matter of turning back to our original guide on turning any action into a keyboard shortcut with AutoHotkey. Using the hotkey syntax we discussed in that post, we come up with this:

RButton:: return

That says that whenever the right-click button is pressed on the mouse, do nothing. (Normally there would be some sort of action described between RButton and return.) It’s as simple as that. You can still send right-clicks if you really need to. For example, if you wanted to right-click a file on your desktop, holding down Shift and then right-clicking with your mouse will still work. This could probably be gotten around, but since you’re not trying to disable right-clicks for security reasons, it’s a nice bonus that you can still right-click if you really wanted to.

So Too-Many-Buttons, you can either download the KillRightClick.ahk script or just download the KillRightClick.exe program and add it to your startup applications for your boy’s account. Hope that does the trick. Thanks, AutoHotkey!

Love,
Lifehacker

Comments (AU Comments | US Comments)

  • hoberion

    Thank you, I just gave an old computer to my kid but the right button was killing her fun! You saved my day..

Post Your Comments

Got something to say? There are two ways to comment:

1. Guests

Click here to comment instantly.

2. Facebook Users

Click below to comment using your Facebook account.

We're looking for comments that are interesting, substantial or highly amusing. If your comments are excessively self-promotional, obnoxious, or even worse, boring, you will be banned from commenting. All comments are moderated.