user400424
user400424

Reputation: 383

Using Send doesn't always work in AutoHotKey?

I have a very simple script to try and remap my AppsKey (the one on the right hand side of the keyboard, between WinKey and Ctrl) to Shift + F2 for the Uplay overlay.

AppsKey::
    Send, +{F2}
Return

As you can see, it's very basic, however, when I try to use it in-game (Far Cry 3 in this instance), it works erratically. Like sometimes when I press the AppsKey, the overlay opens. Sometimes it doesn't and I have to repeatedly tap the AppsKey for it to finally show up or close.

No, my AppsKey isn't broken. I tried mapping it to something else and it works without problems. I just want some lead as to why it's acting erratically in this case.

Upvotes: 2

Views: 3704

Answers (1)

David Metcalfe
David Metcalfe

Reputation: 2411

Per the comments, the solution should be akin to this:

AppsKey::
    SendInput, {Shift down}{F2 down}
    Sleep, 50
    SendInput, {Shift up}{F2 up}
return

Upvotes: 2

Related Questions