blue-sky
blue-sky

Reputation: 53816

Sending and releasing multiple keys at once using AutoHotkey

I'm attempting to send three keys (Alt, Shift, Q) at same time using this script:

:*:pk::   ;
Send, {AltDown}{ShiftDown}{qDown}
return

When I run this is it does not release the keys, it seems like the Alt button remains pressed. After the above keys are pressed I then want to press the "q" character again (separately, not at same time).

How can I amend my script above to achieve this?

Upvotes: 2

Views: 9084

Answers (1)

Elliot DeNolf
Elliot DeNolf

Reputation: 2999

When using Down, you must also send an Up to the same key or else it will remain pressed. This can be achieved like this:

:*:pk::
    Send, {Alt Down}{Shift Down}{q Down}{Alt Up}{Shift Up}{q Up}
    Send, {q}

Upvotes: 5

Related Questions