if RShift was pressed down for more than 200ms
It doesn't anything
if the key was pressed down for less than 200ms send x
else ( if short press, if the key was pressed down for less than 200ms)
Send "b"
I've tried this :
Code: Select all
$RShift:: {
startTime := A_TickCount ;record the time the key was pressed
KeyWait("RShift", "U") ; wait for the key to be released
keypressDuration := A_TickCount - startTime ;calculate the duration the key was pressed down
if (keypressDuration > 200) ; if the key was pressed down for more than 200ms :
{
Return ; Nothing happens
}
else ; if the key was pressed down for less than 200ms
{
Send "b"
}
}
Any help to do so Please!
[Mod edit: Removed all the text that was repeated (almost all of it).]