Pinterest Stumbleupon Whatsapp

Taking shortcuts is awesome — there’s something about doing a task in a speedy way that gives you a sense of fulfillment. Once you’ve mastered the huge list of Windows keyboard shortcuts Windows Shortcuts 101 - The Ultimate Keyboard Shortcut Guide Windows Shortcuts 101 - The Ultimate Keyboard Shortcut Guide With so many shortcuts built into Windows and its software, it might seem impossible to learn them all. Here's the ultimate guide to the most useful keyboard shortcuts. Read More and have every Windows 10 gesture The Ultimate Windows 10 Shortcuts & Gestures Collection The Ultimate Windows 10 Shortcuts & Gestures Collection Windows 10 includes a wealth of shortcuts and gestures for getting around using your touchpad, touchscreen, or keyboard. Here's a big collection! Read More down flat, you might be hungry for more ways to use shortcuts.

AutoHotkey (AHK) is the answer to all of your customization needs. This one little program can take care of remapping keys, creating new shortcuts, and running macros to automate repetitive tasks. Let’s take a look at some awesome scripts you can download and start using right now, then get some AHK basics down so you can make your own scripts where these don’t suffice!

Installing AutoHotkey

Before you can test out some scripts or make your own, you’ll need to get AutoHotkey installed. Visit the main page for AHK, click Download on the right side, and choose Installer to grab the easiest version to install. Run through the quick install dialogue, and you have AutoHotkey running and ready to go!

Now, the program you just installed handles the execution of the scripts you write in AutoHotkey’s language, but you don’t have any scripts running, yet! To create a new one, make sure AutoHotkey is running (by opening your Start Menu and typing AutoHotkey to run the program), then right-click anywhere on your desktop or wherever else is convenient and choose New > AutoHotkey Script. Name it something useful and make sure the file ends in .ahk, or it won’t work correctly.

If you’re going to be writing some scripts for AutoHotkey, it’s a good idea to upgrade your text editor from the bland Notepad Notepad Not Doing The Trick? Try Out The Lightweight Alternatives Xint & Subpad Notepad Not Doing The Trick? Try Out The Lightweight Alternatives Xint & Subpad Read More . Notepad++ is a great free option and is recommended for this purpose. Note that you can open your text editor, type some code, and simply save it as a file ending in .ahk and you’ll achieve the same result as the above method.

Now that you have the software to run the scripts, you can download the code that others have written to automate all sorts of tasks. To save a script, simply download it as an .ahk file and save it wherever you wish.

You’ll probably want some of these scripts to run as soon as you boot your computer so you don’t have to remember to start them manually every time. To do that, copy and paste the .ahk files into your Startup folder by typing shell:startup into the Start menu, or browsing to the following location:

C:\Users\[USERNAME]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

This will ensure they’re running as soon as you start, so you don’t try to use the key combinations and get nothing!

The Best AutoHotkey Scripts

Here are some of the best scripts you can download and start using to make Windows even better right away.

1. AutoCorrect

AutoCorrect is a staple of smartphone keyboards How to Fix or Turn Off Autocorrect on Android How to Fix or Turn Off Autocorrect on Android Read More , but it hasn’t really made its way to desktop yet since you have more precise typing on the latter. However, you’re still bound to make mistakes when typing (whether by slip of the fingers or just not knowing the spelling of a word), so AutoCorrect should be one of the first scripts you get on your computer.

This is an old script, but typos don’t go out of style Why Typos Always Matter, Even Online & In Text Messages [Opinion] Why Typos Always Matter, Even Online & In Text Messages [Opinion] We all make mistakes from time to time. It's natural, a part of life, a learning curve which we use to better ourselves. Typos are no exception. They happen often, and if writing forms a... Read More . It contains tons of common misspellings and when you commit one, it instantly replaces it with the correct version. It even allows you to edit your own words in, which we’ll discuss later.

Download: AutoCorrect Script

2. Disable Lock Keys

The three Lock keys — Num Lock, Caps Lock, and Scroll Lock — aren’t really used that often in today’s computing. You probably only use the number pad for numbers, don’t ever hit Caps Lock except by accident Oops, I Did It Again: 7 Keyboard Shortcuts Users Keep Hitting By Mistake Oops, I Did It Again: 7 Keyboard Shortcuts Users Keep Hitting By Mistake It happens even to the most experienced of users: the accidental keyboard shortcuts. No matter how often you use your computer, weird things can start happening when you’re going too fast, when you lean on... Read More , and might not even know what Scroll Lock does. You can make Windows play a tone when you hit these keys How to Get Alerted When Caps Lock Is Enabled in Windows How to Get Alerted When Caps Lock Is Enabled in Windows Caps lock can strike at the worst times. Here's how to know as soon as you hit that annoying key. Read More , but to go further, try setting them to a default value with this script:

; Set Lock keys permanently
SetNumlockState, AlwaysOn
SetCapsLockState, AlwaysOff
SetScrollLockState, AlwaysOff

This assumes you want Num Lock always on; if you prefer it off, just change that line (or remove it completely and only deal with Caps and Scroll Lock).

3. Re-purpose Caps Lock

Once you’ve used the above code to disable Caps Lock, it makes sense to give that key another purpose Isn't It Time You Made Use of Your Caps Lock? Isn't It Time You Made Use of Your Caps Lock? The CAPS LOCK key is probably the most useless key on your keyboard. Netiquette forbids you to use it because it's considered screaming, which is simply rude. And what else would you use it for... Read More .

Using this short script will turn Caps Lock into another Shift key, but you can change it to anything you’d like (perhaps another Windows key, if your keyboard only has one of those):

; Turn Caps Lock into a Shift key

4. Quickly View or Hide Hidden Files

We’ve shown you how to view hidden folders in Windows How to View Hidden Files and Folders in Windows How to View Hidden Files and Folders in Windows Need to work with a hidden file or folder in Windows? Here's how to view them in just a few clicks. Read More , because many people want them showing all the time. If you only need access to hidden folders once in a while and don’t want them cluttering up your work normally, however, this is the script for you.

This script simply has you press Windows Key + H with any folder open to toggle its hidden files or folders. That’s all there is to it!

Download: Toggle Hidden Files Script

5. Quickly Show or Hide Known File Extensions

In a similar vein, sometimes you want to see file extensions for every file; this comes in handy, if you have multiple files with the same name, or want to make sure that something you downloaded and thought was a PDF isn’t actually a harmful .exe. The below script will let you toggle showing extensions for known file types with Windows Key + Y.

Download: Toggle Known File Extensions Script

6. Insert Special Characters

Though your keyboard has some special characters (like @ or *), there are dozens more that are pretty tedious to access, if you use them with any frequency. With just a line of AHK code, you can quickly insert these special symbols and stop having to hunt around with ALT codes 15 Common Symbols You Can Insert With the Alt Key 15 Common Symbols You Can Insert With the Alt Key Your keyboard has lots of symbols, but there are plenty more that aren't immediately accessible. Read More or copy and paste from a Web list.

Use the template below to create shortcuts that will be useful for you; the left characters are what you press to trigger the shortcut, while the symbol inside the brackets is what gets inserted. So, if you want to press ALT + Q to insert the trademark icon, you would type:

!q::SendInput {™}

For reference, the characters for keys are as follows. You can read more about hotkeys on AHK’s guide page.

  • ^ for CTRL
  • ! for ALT
  • # for Windows Key
  • + for Shift

7. Mimic a Chromebook Search Key

Google’s Chromebooks have many shortcuts of their own, including a completely different key. Google decided to remove the infrequently used Caps Lock key and replace it with a Search button on their machines. You can get a similar functionality with a simple script.

This will launch your default browser and search Google for any bit of text you have highlighted when you press CTRL + Shift + C. Handy to reduce copying and pasting all the time!

 Send, ^c
 Sleep 50

8. Use the Numpad as a Mouse

We’ve shown you how to navigate Windows with just keyboard shortcuts Navigating Windows with Keyboard Shortcuts Alone Navigating Windows with Keyboard Shortcuts Alone You might know lots of keyboard shortcuts, but did you know you could get around Windows without your mouse? Here's how. Read More , but having this script around makes it a lot easier if you don’t want to remember all of those. It uses your number pad to act as a mouse, giving you more precision and a way to get around your computer in case of a failure.

Download: Using Keyboard Numpad as a Mouse Script

9. Launch Any App

Launchers like Launchy How To Be More Productive with Launchy Program Launcher How To Be More Productive with Launchy Program Launcher Read More are great for pulling up any program installed on your computer in seconds, but for your most-used programs you might want a faster way.

The script to open an app is simple; here’s one to launch Firefox when you press Windows Key + F:

#f::Run Firefox

10. Paste into a Command Prompt

Up until Windows 10, you had to right-click and choose Paste to paste anything into a command line; the usual shortcut CTRL + V didn’t work.

If you’re still holding out on Windows 10, this quick script lets you use CTRL + V to paste into the Command Prompt like normal.

#IfWinActive ahk_class ConsoleWindowClass
SendInput {Raw}%clipboard%

Even More!

For even more scripts, including ones that are much more complex, check out the AutoHotkey Script Showcase.

Writing Your Own Scripts

We’ve already covered a lot about AutoHotkey in the past — including how to beef up Windows using special AHK scripts How To Pimp Windows With AutoHotkey Scripts Using ac'tivAid How To Pimp Windows With AutoHotkey Scripts Using ac'tivAid Read More — so I’ll be brief on its uses here. If you’re just getting started with AHK, you’ll probably benefit the most from text expansion What Is Text Expansion & How Can It Help You Save Time? What Is Text Expansion & How Can It Help You Save Time? If you could save yourself even a small fraction of the time you spend typing, you could save hours of your time every week. That's exactly what text expansion is for. Read More .

Basically, text expansion lets you type a bit of text that automatically expands to a lot. Do you have repetitive emails Email Faster & Better With Canned Responses Email Faster & Better With Canned Responses Don’t have time to cook lunch? No problem, grab a can. Need some camping chow that won’t go bad? Easy, get some canned food. Tired of typing the same email replies? Try canned emails! Think... Read More you send multiple times a day? How often do you type out your email address when signing into websites and the like? Instead of wasting time typing these items out every time, set up some text expansion and become more productive.

If you downloaded the AutoCorrect script above, there’s a place at the bottom for you to add any phrases of your own, which is a perfect place to add some single-line expansion. If you’re not using this script, just make a new script for your entries.

It’s quite simple: type two colons, followed by the hotkey text. After two more colons, type the phrase to be expanded. So, if you wanted to make typing “@@” auto-expand to your email address, the script would be:

The possibilities here are many — you could make the hotkey CTRL + ALT + C spit out a canned email that you type several times a day, or any number of other tasks pertinent to your work:

Send Hello,{enter}This is a canned email.

Once you’ve set up some text expansion, you can start remapping keys if you find some of them not useful in their current state.

Do you wish the Insert button was a shortcut for Copy? You can do that!


Check out the AutoHotkey tutorials for more info.

The Power of AutoHotkey

The great part about AutoHotkey is that it’s completely customizable for your needs. If you just want AutoCorrect and a few simple bits of text expansion, you can easily set that up. If you want to go deeper with lots of custom controls and complex shortcuts, you can write anything you please.

You shouldn’t have any trouble coming up with uses for AHK! We’ve written about how it can help you play Path of Exile more efficiently 2 AutoHotkey Scripts To Make You A Better Path Of Exile Player 2 AutoHotkey Scripts To Make You A Better Path Of Exile Player Path of Exile fans, aren't you sick and tired of suffering from catastrophic deaths in the game's Hardcore league setup? Is there anything worse than devoting hours upon hours into a character on your favorite... Read More , and chances are it can help with your favorite game, too. Not a gamer? Combine it with existing Microsoft Office shortcuts 60 Essential Microsoft Office Keyboard Shortcuts for Word, Excel, and PowerPoint 60 Essential Microsoft Office Keyboard Shortcuts for Word, Excel, and PowerPoint Hundreds of keyboard shortcuts are available in Office, but these are the most important ones you should know because they will save you a lot of time. Read More and you’ll be more productive than ever before!

What are your favorite uses for AutoHotkey? Share your favorite scripts with us below to expand the list!

Image Credit: holding dental equipment by FabrikaSimf via Shutterstock

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Mitchell Allen
    June 29, 2016 at 2:10 pm

    Hi Ben,

    I use AutoHotKey for everything. (the letters a h k spell out AutoHotKey for me. The letters c h e sign all of my emails and post comments.)

    Here is a tip for email addresses and any other auto-expansion keywords that fit the bill:

    Normally, a space is required after typing the keyword, such as your @@ example. To immediately expand the text, change the definition to :*:@@::

    That small change may not seem like much, but it "feels" faster and you don't have to backspace to remove the space (if you had to before).

    I also use a few custom combinations of Numpad0 + key to launch, edit, and interact with batch files. Here is a useful example:

    ;Purpose: Send "enter()" to command window
    ; If Python is running, it will exit
    ; If at prompt, window will close
    Numpad0 & NumpadEnter::
    SendInput exit(){Enter}

    You can read more about custom combinations here:



  2. Anonymous
    June 3, 2016 at 4:42 pm

    Very good article, thanks a lot ! I use AHK scripts a lot, written by others. So, apart from some more useful scripts given above, I will also be able to learn more about the writing of them.

    • Anonymous
      June 3, 2016 at 5:07 pm

      Edit: the command prompt script does not work for an elevated command.

  3. Jerome Masson
    June 3, 2016 at 8:20 am

    I use AHK every single day at work and it saves me for a lot of things!

    I use it to:
    - type credentials that are asked any time I access files on a SharePoint
    - launch Notepad (default script)
    - type a signature in emails

    Before migrating to Office 2016, we were using Office 2007. So I was using AHK to "emulate" the quick actions from the newer versions (i.e. Ctrl+Shift+1 to forward an email to a certain person).

    I also created a set of scripts to move the Outlook and Skype windows from one screen to another (when I switch from laptop only to docking station with second monitor, and vice versa).
    This is time saving for me as I move these 2 windows every time I go to a meeting.

    I use AHK along with Rainmeter and Rocket Dock. And I can tell you that I will never go back to the "plain Jane" version of Windows!!

    • Ben Stegner
      June 4, 2016 at 4:21 pm

      That's awesome! It sounds like you really have a good grip on what AHK can do and use it to iron out the less efficient parts of Windows. Thanks for sharing!