Hold Key/Press other key once

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
sajent
Posts: 1
Joined: 16 Jul 2017, 15:11

Hold Key/Press other key once

16 Jul 2017, 17:33

Trying to create a script that when j is held down it types j once but then switches to k

So it would look like this when the j key is held down

jkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Rohwedder
Posts: 7655
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Hold Key/Press other key once

17 Jul 2017, 07:59

Hallo,
try:

Code: Select all

$j::
Send, j
Sleep, 100
While, GetKeyState("j","P")
{
	Send, k
	Sleep, 100
}
Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: haomingchen1998, mcd, Peiya, ShatterCoder, spellegrnio1 and 93 guests