Running out of comfortable and easy to remember hotkey combinations? In that case I bring you double tap hotkeys!

In this guide I will give you a piece of code, tell you how to use it and fit it to your needs. But don’t start sweating at the word code just yet, you don’t need to understand what’s going on for things to work.
Before we start

Download and install Autohotkey. That’s what drives our script.

Create an Autohotkey script by right clicking on your desktop, new and “Autohotkey script”. Afterwards delete what’s inside. Or just grab the example script, I have made. In there you can also find my own setup. Bare in mind everything after semicolon (;) is just a description and not part of the code. (a comment)

Let’s get down to business!

If you didn’t download my example, copy paste the code from below to your script file.

#if WinActive("ahk_class Notepad")

t := A_PriorHotkey == A_ThisHotkey && A_TimeSincePriorHotkey 200 ? "off" : -200
settimer, tappedkey_q, %t%

if (t == "off")
goto double_q

Send {q}

Send +{o}


The code above is set to trigger shift+O when you double tap Q within an interval of 0.2 seconds inside Notepad.

The first line you see allows for the script to be context sensitive. In other words the code will only work for a certain application, e.g. 3ds max. For that to happen just run an autohotkey script (the one you either downloaded or created). Then right click the newly appeared green “H” icon in the system tray and click Window spy. Here you will get a variety of information but what we care about is the topmost rectangle. In there, whenever you click a certain program it will show you its ahk_class and some other things. Copy paste the name of the class in place of Notepad.

If you single tap your desired key it will have a delay. That’s why we keep the script working only for certain programs.

If you want your macro to work with multiple programs, simply add “or WinActive(“ahk_class Second_Program”)” like this:

#if WinActive("ahk_class Favorite_Program") or WinActive("ahk_class Second_Program")

Now replace Q in line 3, with the key you want to double tap,


as well as line 12.

Send {q}



Send +{o}

with the key you want to activate and add modifiers if you wish. Other wise you will trigger the default. Bellow you can see how to describe the main 3 modifiers:

+ - shift

! - alt

^ - ctrl

To trigger alt+F , your code would look like this

Send !{F}

For N

Send {n}

To find more information about the names of the various keyboard keys, e.g. numberpad keys, checkout the key list and for modifiers the hotkeys list.

Setting up the timming

In the 3ed line with code, you can see the number 200 written twice. That’s essentially the gap of time when the code listens for a second tap. Only after the gap has elapsed will the single tap be activated. The timing is in milliseconds so 200 is equivalent to 0.2 seconds. Play with the number to see what suits you. Personally I like 200 because I don’t have to think how fast I have to click to register a double tap.

Fitting multiple double tap scripts in the same file:
  1. copy paste the code without the first and the last 3 lines
  2. for each paste of the code, change the suffix of tappedkey and double to something else. I use the letter of the tapped key to keep things easier to read.
Pausing the script:

In the example I have also added Scroll lock ( that key that nobody uses) as an on/off toggle for the script. If you prefer,  Scrolllock can be replaced with another key.