1. When un-toggled, LButton's function retained, pass all original left-clicks;
2. When toggled, LButton's function retained, unless LButton is held down for more than 1s (spam Space in this case).
Code: Select all
~LButton::
If (!Toggle)
return ; Changes nothing when un-toggled
KeyWait LButton, T1 ; When toggled, wait 1s for releasing LButton
If ErrorLevel ; LButton still held down
While GetKeyState("LButton", "P"){ ; When LButton is held down
Send, {Space}
Sleep 100 ; Spam Space
}
return
So I wonder is there a specific command for blocking a key's native function, only for the spam Space part of the code?
Or should I do it in some other way? Any help would be appreciated.