however, when I include "enter", "media_prev" misbehaves. it repetitively send "__short.press.prev" while the key is pressed.
how can I solve this ?
Code: Select all
#Requires AutoHotkey v2.0
media_prev:: {
startTime := A_TickCount
While GetKeyState("media_prev", "P") {
if ((A_TickCount - startTime) > 300) {
send("__LONG.press.prev")
KeyWait("media_prev")
return
}
}
;------------ SHORT PRESS
send ("__short.press.prev")
return
}
enter:: {
send("enter key")
}