AutoHotKey alt stays pressed

559 views Asked by At

I have this script

+#^a:: 
SetTitleMatchMode 2
IfWinExist InterCounter
{
    WinActivate
    Send x
    Send !{ESC}
}
return

after using it, alt stays pressed and I have to press alt on my keyboard to get to normal state (no key pressed). If I forget to do it and type something, a key shortcut is initiated. If I type SPACE for example, ALT+SPACE is pressed.

I tried various things. {Alt up} and other. They did not work. Where is the problem? Is there a fix for my script?

1

There are 1 answers

5
Bizz Keryear On

(would do that in a comment if I could)

try to Send , {ALT down}{ALT up} which should do the trick. If not something else is interfering, like a 3d party program. Try close everything on your system except notepad and the AHK-script and see if that helps.