You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AHI.SendKeyEvent(KEYBOARD, GetKeySC(key), sflag == "Down" ? 1 : 2)
Press is 1, release is 0. 2 will do nothing.
So you will only ever press the key, and never release it
Also, this is inefficient:
if (key == "!") {
StringReplace, key, key, !, Alt
}
if (key == "+") {
StringReplace, key, key, +, Shift
}
Use else if
if (key == "!") {
StringReplace, key, key, !, Alt
}
else if if (key == "+") {
StringReplace, key, key, +, Shift
}
key will only ever be one of these values, it's pointless to check them all
I also probably would not bother reversing the array, it's computationally quite expensive, just iterate the keys array forward or backward depending on the value of sFlag
if (sFlag == "Up"){
i := 1
order := 1
}
else
{
i := keys.Length()
order := -1
}
Loop % keys.Length {
key := keys[i]
; Do IF checks here
i += order
}
sKey = "+a"
sflag = "Down""Up"
I catch a bug in press Shift(press) -> a(press) -> a(release) -> Shift(release)
Shift button Stucked after
Why?
The text was updated successfully, but these errors were encountered: