How to hold a key and then another key?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
DeBoiAayan
Posts: 1
Joined: 10 Aug 2022, 14:00

How to hold a key and then another key?

Post by DeBoiAayan » 10 Aug 2022, 14:03

I want to make a code that for example holds down a for 10 seconds, and when a is released immediately holds b for another 10.

User avatar
mikeyww
Posts: 26937
Joined: 09 Sep 2014, 18:38

Re: How to hold a key and then another key?

Post by mikeyww » 10 Aug 2022, 19:28

Welcome to this AutoHotkey forum!

Code: Select all

OnExit("done")

F3::
Send {a down}
Sleep, 10000
Send {a up}{b down}
Sleep, 10000
Send {b up}
SoundBeep, 1000
Return

done(exitReason, exitCode) {
 Send {a up}{b up}
 SoundBeep, 1500
}

Post Reply

Return to “Ask for Help (v1)”