Hello,
I am totally new on autohotkey, but I can not find proper solution or merge it from more than one solution.
What is my goal?
1) On LMB click, additionally tap "Q" key (maximum once per 500ms)
2) On LMB hold, tap "Q" once every 500ms (only tap "Q", do not emulate hold for this key)
3) LMB must work on unchanged way - just add tap "Q" button every 500ms
Examples
a) If I spam LMB 10x/sec - script additionally sends "Q" key 3x times (once every 500ms)
b) If I hold LMB for ~1sec - script additionally sends "Q" key 3x times (once every 500ms)
c) If I hold LMB for ~2secs - script additionally sends "Q" key 5x times (once every 500ms)
<3
LMB - normal behavior + key tap every 500ms
Re: LMB - normal behavior + key tap every 500ms
Welcome to this AutoHotkey forum!
Code: Select all
~LButton Up::SetTimer, Stop, -200
~LButton::
If on
Return
SetTimer, Q, 500
on := True
Q:
Send q
Return
Stop:
SetTimer, Q, Off
on := False
Return