Suffix key of a custom hotkey combination gets stuck down if it's held before the prefix
Hello, I'd like some help with the following. (It's mostly for gaming purposes, so don't waste too much of your time on it if the answer isn't obvious.)
1.) I have this custom combo hotkey:
~n & a::7
It works, but "a" tends to get stuck in many applications. The problem usually occurs in a specific scenario:
- I press "a" down first, then
- I press "n" down too, then
- I release "a" (with "n" still held down)
All the games I tested continue to act as though I never released "a". The issue persists until "a" is pressed and released again.
Curiously, GetKeyState
returns zero on "a" while it's stuck like this, but virtual keyboards show it to be held down.
2.) I tried this, too:
#HotIf GetKeyState("n","P")
a::7
#HotIf
However, it leads to different problems. Sometimes it causes the simulated key (7) to be stuck if I release both keys at the same time (and if I release "n", the prefix, first).
Besides, this approach seems fully incompatible with a nonconventonal controller I'm making the script for in the first place (PSP connected via PSPDisp). The hotkey simply doesn't fire; GetKeyState
doesn't seem to work properly with the keyboard inputs simulated by PSPDisp.
Approach 1.) is almost functional, at least it doesn't lead to issues specific to the "controller"; it has the exact same problem on a keyboard. Any advice appreciated!