skeggse
skeggse

Reputation: 6323

Autoit 3 Generic Keypress

It seems like there should be a generic keypress listener, something like this:

hotkeysset("listener")

func listener(key)
    msgbox(0, "Key", "You pressed " & key)
endfunc

while true
    sleep(100)
wend

But short of writing a script that generates the appropriate hotkeyset calls for each key on my keyboard, I can't figure out how to do that. Any thoughts?

Upvotes: 2

Views: 2232

Answers (1)

aphoria
aphoria

Reputation: 20179

Check out this UDF (User-Defined Function), IsPressed_UDF.

Upvotes: 2

Related Questions