I am trying to implement Autoshift with AHK
Script waits for key release and when certain time elapses the Hotkey sends a shifted character.
The problem is that when I type keys very fast inputs are swapped:
I type ab - output is ba I type ba - output is ab
Is there any way to "flush" previous hotkey in waiting state or any way to achieve ordered Keys when using KeyWait?
PushDuration := 250 $a:: time := A_TickCount KeyWait, a var := A_TickCount - time if(var < PushDuration) SendEvent, a else SendEvent, A return $b:: time := A_TickCount KeyWait, b var := A_TickCount - time if(var < PushDuration) SendEvent, b else SendEvent, B return