I use KeyWait to detect long key presses.
Problem is: if I don't do a long press, hence press and release it quickly, it stills delays the processing. I would expect that on release it instantly sends my commands, without any delay whatsoever. The result is that the characters I type are jumbled, because the processing of my long-press keys is delayed.
My concrete case is the following: q key produces a q when pressed normally but an @-sign on long press
Code: Select all
$q::OnLongPress(SubStr(A_ThisHotkey, 2), "@")
OnLongPress(PressedKey, CharToWrite) {
KeyWait, %PressedKey%, T0.3
if ErrorLevel{
SendInput {%CharToWrite%}
} else{
SendInput {%PressedKey%}
}
KeyWait, %PressedKey%,
}