Fixing mouse button/wheel from unintended double clicking

I am currently using a cyborg R.A.T. 7 on my desktop which, after less than a year, has started exhibiting signs of wear. This is evident from the fact that a simple click of the wheel will at around 60% of the time send a double click instead. This is due to the membranes (ie: the switches) wearing away causing it to be faulty. Naturally, this is driving me completely nuts since opening a hyperlink using the mouse wheel will, most likely, open the hyperlink twice.

Aside from fixing the problem by sending it back to the manufacturer, it’s possible to just ‘patch’ up the problem using AutoHotKey (http://autohotkey.com/). The program allows you to programatically control actions sent by your mouse or keyboard. In order to fix the problem described above, run the following ahs script:

MButton::   
   If (A_TimeSincePriorHotkey < 150)
      Return
   Send {MButton}
Return

The above will simply check whether the double click is below 150ms. If it is below 150ms, the double click is effectively ignored as it's improbable that any human can click that fast. You may raise or lower this depending non your requirements, though a higher number for the middle button wouldn't hurt since it's rare to ever need to double click the wheel anyway.

You may want to replace MButton with LButton or RButton as well in case your mouse is defective on the left or right button. For more information on different keys, see http://www.autohotkey.com/docs/KeyList.htm

Oh, and I do not recommend the Cyborg mouse at all. Aside from its modern appearance, it is not a very good mouse. It's a little uncomfortable to use despite the fact that it is 'customizable', and I miss the free scrolling mode which my logitech G500 has. My G500 after 3 years of use still seems to work flawlessly.

11 thoughts on “Fixing mouse button/wheel from unintended double clicking

  1. Leo…I think you saved me from going crazy.

    I use a Cyborg r.a.t. 7 Contagion edition. I play a lot of “click happy” games. (SCll, DSll, a few shooters). I’ve already had to RMA the mouse once for this double click issue (LButton for me), and it’s no longer under warranty. Hopefully this script will keep me up and running.

    Thanks!

  2. A better version of your script allowing click and drag (you can tweak the 10 value up or down, in my case 10 are good):

    LButton::
    If (A_TimeSincePriorHotkey < 10)
    Return
    Click Down
    KeyWait, LButton
    Click Up
    Return

    • Thanks a lot to Leo for the original script and Benn for the dragging option. I’ve changed it to allow dragging with the middle button.

      MButton::
      If (A_TimeSincePriorHotkey < 10)
      Return
      Send {MButton Down}
      KeyWait, MButton
      Send {MButton Up}
      Return

  3. Thanks so much for helping me with this issue, it has been driving me completely crazy! This fixed my mouse issue and is still working good thanks to you! Thanks for helping me. :)

  4. I found this information so useful, I MADE an account to thank you :P. Luckily I already had Autohotkey installed for Dark Souls 2 (The game has some considerable mouse input problems). I’m hopefully going to be getting a new mouse soon, but your patch at least keeps me from opening like 2-5 tabs in a single click until then.

    I’m still a scrub when it comes to Autohotkey itself, and went ahead to google the issue, and found this. You’ve made my day, and for that, you have my thanks, good Sir. /grovel

  5. Hey, thanks for the script, it did stop my double clicking, but when i try to play CS:GO and hold the mouse1 to spray continously it just stops at 1 bullet. Can anyone help me edit the script so i can hold the mouse and fire

  6. Wow, dude, u really helped me. I’ve got r.a.t 5 and if it didn’t cost so much, it would be in a rubbish a long time ago. However design is pretty dope 😀

Leave a Reply

Your email address will not be published.