Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AHK: Unpress All Pressed Keys

Tags:

autohotkey

Is there a way to unpress all pressed keys with AHK?

By pressed, I mean Send {something down}

and by unpress I mean Send {something UP}

like image 993
RainingChain Avatar asked Aug 11 '13 02:08

RainingChain


1 Answers

You're in the right direction. All you would need to do is to create a list of keys to check, then add an if statement (if needed at all) to unpress the keys if pressed.

KeyList := "Shift|a|b|c|d|e|f|g|h|i|j" ; and so on

Loop, Parse, KeyList, |
{
    If GetKeystate(A_Loopfield, "P")
        Send % "{" A_Loopfield " Up}"
}
like image 109
Elliot DeNolf Avatar answered Nov 12 '22 11:11

Elliot DeNolf