Xbutton1 Hold Keypress Topic is solved
Xbutton1 Hold Keypress
hi, i wanted to make my xbutton1 to serve as keyboard press a (laptop keyboard is broken), but when I hold down the xbutton1 it only sends 1 instance of a. I wanted it to emulate a long press of keyboard press a.
Re: Xbutton1 Hold Keypress Topic is solved
This kind of emulates the keyboard's auto repeat, which is the aspect you're probably missing, the long press is likely already happening, just I can't tell since there isn't any code listed so I don't know what you've tried.
Play around with the Sleep amounts to get the timing how you want it.
Code: Select all
XButton1::
Send {a down}
Sleep 500
While GetKeyState("XButton1","P")
{
Send {a down}
Sleep 50
}
Send {a up}
return
Who is online
Users browsing this forum: Descolada, inseption86, mikeyww and 437 guests