How can I make it so when I hold the spacebar it acts like one normal press?
Here is my code:
#InputLevel, 10 ;set send level for the following code to 10
$Space::
#InputLevel ;set it back to default value of 0 for any remaining code
now := A_TickCount
while GetKeyState("Space", "P") ; to find out whether space-bar is held
if (A_TickCount-now > 180) ; this time is tested on asker's computer
{
SendInput {Space Down}
SendInput {Space Up}
return
}
SendInput {Space} ; if key detected to be tapped, send space as per normal
return
Got it form some other forums, but the current problem is it just repeats pressing the space key over and over
New contributor
16BitDoggo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.