I am a bit of a geek for proper punctuation: Em dashes… en dashes… curly quotes… ellipses… I love them all! Prior to 2007, I was a long-time Windows user and was a master of the Alt + numeric code system of entering special characters on that operating system.1 For nearly a decade, however, I’ve been writing and developing on a Mac and I absolutely love how much easier it is to use special characters. When I started setting up my new Surface Book, I began searching for a way to bring Mac-like special character entry to Windows 10.
Disclaimer: I take absolutely no credit for the code you see below. I will give full credit to the sources as I discuss each. I just wanted to bring it all into one place so it’ll save you a few hours of research to get everything working.
Step 1: Set up AutoHotKey
David Nagel’s solid article on mapping keystrokes in Windows, I introduced me to AutoHotKey. It’s an incredibly powerful program that’s like the lovechild of TextExpander and Quicksilver.
In his article, David walks through the process of getting set up with AutoHotKey:
- Download & install it.
- Create a new
.ahkfile (New > AutoHotKey Script in Windows Explorer) and name it whatever you like.2
- Right-click the script, and choose Edit Script from the context menu.
- Enter some keyboard shortcuts (more on that in a moment).
- Save the script. I chose to save it to Dropbox to make it portable.
- Double click it to run the script.
- Open up your favorite writing tool and see your handiwork in action.
Step 2: Create some shortcuts
AutoHotKey is completely scriptable and adding shortcuts is relatively straightforward. There are a few reserved characters, but once you understand what they are it’s pretty easy to get going very quickly. Here’s Dave’s intro example:
In AutoHotKey scripting, “!” stands in for Alt and “+” stands in for Shift. So, to translate:
- Alt + - will produce an en dash (–)
- Shift Alt + - will produce an em dash (—)
With these two examples, I was able to jump right in and map many of the most common shortcuts I use while writing. Before I got too far, however, I realized I really needed accents, umlauts, and the like. I searched some more and eventually discovered a post in the AutoHotKey forum archive by “Veil” from way back in 2008.
Veil broke his solution into two parts, but I’ve combined them here to make it easier for your to copy into your AutoHotKey script file. This code has provided everything I’ve needed so far, so Veil—wherever you are—thank you!
Step 3: Run your script when Windows starts
The last thing you’ll want to do is add your
.ahk file to Windows’ startup items. Dave covered that in his piece as well:
- Create a shortcut to your file (Right click > Create Shortcut)
shell:startup(⊞ Win + R opens the Run dialog or you can type ”Run“ in the Cortana Search Box)
- Move your shortcut to the folder that opens.
Once you’ve followed those steps, you’re done. You can update your
.ahk scripts needed and just double click it to replace the instance that’s currently running.
If, like me (and Dave and Jonathan and Dan), you’re using Windows after a long time in Mac land and you’re a typography nerd, hopefully you’ll find this helpful. And if you come up with any improvements to the character mapping, please share!
If you shun the mouse, you can create a text file in your favorite editor and name it with the
.ahkextension, but you might run into character encoding issues. I created mine in VS Code as UTF-8, but had to open the file in Notepad and re-save it again to get it to actually work. I never figured out the exact issue, but I thought I’d give you a heads-up. ↩