simulate holding down a keyboard key

EDIT: I was able to work around the problem by using Sleep(), but the question remains.
_________

How would I programmatically hold down a keyboard key?

I've tried SendInput and keybd_event, but they seem to be only for keystrokes, rather than holding the key down.

And with PostMessage/SendMessage I have to specify a window, while I want it to work globally.

My goal is to make scripts for a tool-assisted speedrun by pressing/holding/releasing keys at specific times.

Any help is welcome!
Last edited on
Topic archived. No new replies allowed.