[Need Help] Click 2 times = Shift stops holding
Posted: 20 Apr 2017, 16:23
by ZimounZ
How would I make a script that if I press left mouse button twice....it would stop a key from holding.
Or what tutorial can I use to learn how to make this script.
Re: [Need Help] Click 2 times = Shift stops holding
Posted: 21 Apr 2017, 04:52
by Rohwedder
Hallo,
little example:
Code: Select all
SetTimer, ShowKeyState
Return
^q::
KeyWait, q
Send {q down} ;press and hold q
Return
^w::
KeyWait, w
Send {w down} ;press and hold w
Return
~LButton:: ;press left mouse button twice within 500 ms
If (A_PriorHotkey = "~LButton" And A_TimeSincePriorHotkey < 500)
{
Send, {q up} ;release q
Send, {w up} ;release w
}
Return
ShowKeyState:
qState := GetKeyState("q")? "down":"up"
wState := GetKeyState("w")? "down":"up"
ToolTip, % "q: " qState " w: " wState
Return