double tap while holding down key

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
storro
Posts: 1
Joined: 16 Apr 2021, 07:19

double tap while holding down key

16 Apr 2021, 07:32

I am trying to make a script where if I double tap a key, {q}, withing "TimeSincePriorHotkey" while holding down alt, either
"
Send {alt down}
send {k}
Send {alt up}
"
or
"
send {k}
sleep 10
send {k}

// (send double tap "k")...
"
//will be executed, both works, alt might make troble since alt is used, but maybe this is whre the dollar sign is used?
//Then if key is just pressed once, in this case {q} while holding alt, it will send normal
"
Send {alt down}
send {q}
"

this is what I have so far, but it doesnt work

Code: Select all

$LAlt down::
if {q}&&(A_ThisHotkey = A_PriorHotkey && A_TimeSincePriorHotkey < 200)
{
	Send {alt down}
	send {k}
	Send {alt up}
}
else
{
	Send {alt down}{q}{alt up}
}
return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 330 guests