[FIX] Mouse double-clicks when clicking once

Status
Not open for further replies.

Khalan

Honorable
Jun 7, 2012
97
0
10,660
My Roccat Kone XTD mouse began occasionally clicking twice when I used the right mouse button.

I couldn't find a fix short of opening up the mouse which I didn't really want to do, so I looked into AutoHotkey and thought I'd put this here for anyone else who has this problem.

AutoHotkey is a free macro / keystroke manager. You can find it here: http://www.autohotkey.com/

This is the script I created:

[strike];RIGHT MOUSE FIX
RButton::
Click down right
Click up right
Sleep, 50

This overrides the normal mouse behaviour and makes it so that upon clicking the right mouse button (the 'RButton::' line) AutoHotkey tells Windows to click and release the RMB and wait for 50 milliseconds ('Sleep, 50'), preventing double clicks. This does mean, however, that you can't right-click and drag unless you hold another key like Shift or Ctrl down.[/strike]

New script (so far it's working great, I need to test further though):
;RIGHT MOUSE FIX
RButton::
Click down right
KeyWait, RButton
Click up right

All this is doing is replicating the standard windows behaviour, therefore it shouldn't interfere with anything. I'm assuming that AutoHotkey's default mouse detection delay (of 20ms) allows the microswitch time to depress, therefore stopping a double right-click. Or I could be completely wrong.

If anyone has any better ideas, let me know as I'm new to AutoHotkey, otherwise, this works for me.

Steps:
1) Download and install AutoHotkey from http://www.autohotkey.com/
2) Create a new file anywhere on your computer called Rightclickfix.ahk (the name doesn't matter, as long as the extension is .ahk)
3) Paste the above script into it and save it
4) Run Rightclickfix.ahk.
 

USAFRet

Titan
Moderator


Dirt/gunk on the microswitch, or just a worn out switch. Aside from your Autohotkey solution (which I'd find messes with too many other functions), the only fix is to clean it or replace it. You may be able to get enough compressed air in there to blow the gunk out.

Nice script in AHK, theough.
 

Khalan

Honorable
Jun 7, 2012
97
0
10,660
Yeah, that's what I was thinking - with the above script you can no longer hold the RMB down, which could be a problem for some apps or games, though the script can be suspended at any time. You can drag the RMB if you hold shift or ctrl though. I saw in AutoHotkey there is an option for mouse delay which I will look into; I may be able to use AHK to make the RMB behave normally without double-clicking.

I thought it would be the switch, but I didn't really want to open the mouse up, partly because I don't want to wreck it further, partly because the screws are below the teflon glide pads. Before I buy a new mouse I'll try opening it up (I have successfully fixed my Logitech mx518 before so it's worth a try).

Edit:
I may have come up with a proper fix that makes the RMB behave normally. Updated first post.
 

Frank Grams

Honorable
Aug 5, 2013
1
0
10,510
Unwanted mouse double-clicking happens because of a combination of too little tension in the switch spring on the circuit board and too much vibration in the mouse buttons, which can cause extra clicks as the vibrating button comes into contact with and leaves contact with the switch on the circuit board. Fixing either the vibration or the spring tension will solve the problem. I fixed the problem with my mouse by placing a dome-shaped piece of electrical tape across the ends of the left and right mouse buttons. This causes each mouse button to act as a vibration dampener for the other, which prevented the double-clicking for my mouse. This can cause both buttons to click if the button is pressed too close to the middle of the mouse at the end of the button, but as long as you click somewhere in the outside half of each button, it seems to work fine.
 
Status
Not open for further replies.