What I want is,
- If I press "f" twice with 300 ms delay, then "i" is pressed once.
- If I press "f" once, then "LButton" is pressed once.
- If I hold "f" down, then "LButton" is held down until I leave f button.
So far I tried this codes but it does not do exactly what I want.
Code: Select all
f::
if 1_presses > 0
{
1_presses += 1
SetTimer Key1, 300
return
}
1_presses = 1
SetTimer Key1, 300
return
Key1:
SetTimer Key1, off
if 1_presses = 2
Send {i}
else
(not GetKeyState("LButton" , "P") )
Click down
1_presses = 0
return
f Up::Click up
- if I press f once, then LButton is pressed permanently
- if I press f twice, then i is pressed once but also LButton is again pressed permanently
- if I hold f then nothing happens.
P.S. Please try to keep it as simple as possible so that I get the least input lag.