Zitat von
Windows SDK:
If the function succeeds, the return value specifies whether the key was pressed since the last call to GetAsyncKeyState, and whether the key is currently up or down. If the most significant bit is set, the key is down, and if the least significant bit is set, the key was pressed after the previous call to GetAsyncKeyState. The return value is zero if a window in another thread or process currently has the keyboard focus.
Also ein Vergleich auf <>0 bringt nicht das gewünschte Ergebnis. Wenn die Taste gedrückt wird, ist das höchstwertige Bit 1 was bei Integer eine negative Zahl bedeutet