Ignore mouse clicks (faulty mouse)

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Scorpion
Posts: 1
Joined: 19 May 2018, 03:02

Ignore mouse clicks (faulty mouse)

19 May 2018, 03:41

Hi guys,
Recently I'm facing an issue with my mouse. Randomly on a Left click, double click or Right click is triggered (approx 3/10 times)
(Yes I know I've to replace my mouse, it is in warranty period but the service center is far from my place and I don't have time for the same so I'm looking around for a temporary fix)

Right mouse button is fine. The problem lies with the left mouse button which triggers right clicks and double clicks.

So I came across AHK and found a snippet online for doubleclicks.
Here is the code:

Code: Select all

LButton::
If (A_TimeSincePriorHotkey < 100) ;hyperclick
Return
sendinput {LButton down}
KeyWait, LButton
sendinput {LButton up}
Return
but this does not solve the right click issue.

and also this one I got online. I replaced "Send, a" with "Click".

Code: Select all

LButton & RButton::
Click
Return
I tested the above code but then the left click wont work (8/10 times).

Maybe if the time interval between the left and right click is less than 1 second we can ignore the right click or something similar maybe?
But I don't know any scripting so maybe if someone can help it would be great.

Thanks in advance.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], mikeyww, Sarhad and 289 guests