Pressing a sequence of keys to activate a command

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Natu
Posts: 2
Joined: 23 Aug 2017, 03:05

Pressing a sequence of keys to activate a command

23 Aug 2017, 20:38

Hi, I'm new to AHK and am looking to make a sequence of key presses produce a symbol.

Such as, if I press 'a' and then '1' less than 2 seconds after it produces 'b' or something similar.

Any help appreciated.
obeeb
Posts: 140
Joined: 20 Feb 2014, 19:15

Re: Pressing a sequence of keys to activate a command

23 Aug 2017, 22:03

The following will do what you requested:

Code: Select all

a::aTime := A_TickCount

1::
   if (A_TickCount - aTime < 2000 )
      send b
return
For the "something similar" you will need to learn some Autohotkey. I recommend you start with the Tutorial(link at the top right of this page).
Natu
Posts: 2
Joined: 23 Aug 2017, 03:05

Re: Pressing a sequence of keys to activate a command

24 Aug 2017, 03:56

Thanks! It works as intended.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Araphen, Dobbythenerd1 and 324 guests