last updated: 7 November 2020 (approximate reading time: 6 minutes; 1229 words)
A standard computer keyboard does not have an em dash key. For Windows computers there’s a quick and easy way to add this key.
Before I get to how to implement an em dash key, let’s look at when an em dash may be used. If you’re just here to get an em dash on your Windows keyboard, jump to the section Why This Way.
When to Use an Em Dash
There are three main situation when an em dash should be used:
- first, it can be used parenthetically (instead of brackets/parenthesis)
- second, it can be used where a colon would commonly be deployed, and
- third, it can be used for cut off speech.
The choice to use the em dash parenthetically or in place of a colon is—to a large extent—a matter of taste. To my mind, the deployment of the em dash gives more of a following on flow and so I often prefer it.
However, there is no other clear way to represent cut off speech.
Cut Off Speech
An em dash should be used to show dialog that is choked or abruptly cut off. This may happen when another character talks over the first, thereby cutting the dialog, or if an external factor causes the speech to be silenced. So for instance:
“When are you going to—”
The em dash can be used twice when a second speaker interrupts the first, and the first speaker then continues.
“But I love—”
“Don’t say it.”
However, an em dash is not appropriate when a speaker trails off or loses their train of thought. In this case, an ellipsis is the correct mark:
“But I love you, and…” And what I thought?
The en dash is used with a span or range of numbers, times, or dates. For example:
The final score was 7–5.
The en dash can also be used to compound words, but this is more of an aesthetic choice.
While the en dash does have specific uses, I tend to use a hyphen since it’s nearly indistinguishable from a hyphen and a meaning is never unclear to a reader if a hyphen is substituted for an en dash.
More About Dashes
You can read more about the em dash and the en dash at The Punctuation Guide website.
Why This Way?
So now we’ve looked at when an em dash or an en dash might be used, let’s move on a look at how to assign an em dash or an en dash key on a Windows keyboard.
There are several ways to implement an em dash key in Windows. I have chosen the option set out in this note because it has many advantages (it’s fast, robust, simple, customizable, and expandable—you can add an em dash, an en dash, an ellipsis, and accents over letters, among other options, and it works for all apps on Windows, not just Word) and there’s only a small disadvantage (a piece of software needs to be installed).
For Mac users, I’m sure there are ways to achieve the same end, but I’m a Windows person, so I’m not going to offer any thoughts about systems I’m not familiar with.
This route to putting an em dash on a keyboard uses a piece of software called AutoHotkey (which you can download for free from: autohotkey.com).
AutoHotkey is a powerful piece of software which has many uses in addition adding an em dash key, but those applications are beyond the scope of this note.
With AutoHotkey, it is possible to set up a hotkey (in AutoHotKey speak) which is the trigger key (or trigger key combination), that invokes the desired output (in this case, to trigger an em dash).
It is possible to set up many hotkeys to trigger many different outputs. The hotkeys and their outputs are defined in a script—a simple text file which defines the instructions.
For an em dash, I have set the
alt key and the
hyphen key (the minus sign to the right of the 0 on my keyboard), pressed together as the trigger key. This means I can get three characters from the hyphen key:
- if I press the
hyphenkey alone, I get a hyphen
- if I press the
shiftkey and the
hyphenkey together, I get an underscore
- if I press the
altkey and the
hyphenkey together, I get an em dash
Setting Up an Em Dash Key
The process to set up an em key is straightforward.
First, download and install AutoHotkey. You can find the application and installation instructions at autohotkey.com.
Next, you will need a script file. You can download a script file which uses the
alt key and the
hyphen key in combination to trigger an em dash from: simoncann.com/downloads/em-dash.ahk.
When you have downloaded the script file, put the file in your Windows startup folder. Mine is at: C:\Users\Simon\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup Yours will likely be somewhere similar. If you want to know more about where this folder may be located, then read this article.
Once the script file is in your Windows startup folder, the script will run automatically when you boot your machine. If you edit this script file, then those edits will run automatically (next time the machine is booted). If you want to test the script file without rebooting your machine, double click on the file to run it.
And that’s it, you now have an em dash on your machine when you hold the
alt key and the
If you just want an em dash key, you can stop reading here—the rest of this note contains some more details about the script and tweaks that can be made (for instance, to use an en dash).
There are three lines to the script (which you can download from the link above) that creates an em dash key. If you want to edit the script, you can open it in any text editor (such as Windows Notepad).
This is the text of the script:
The first line sets the trigger key (in this case
hyphen). In AutoHotkey-speak, the
alt key is represented by an exclamation mark (!).
The second line tells the script to send the characters after the comma (in this case, an em dash) when the trigger key is activated.
The third line is a return.
Changing the Script
The script could be expanded or changed. Take this script as an example:
This script makes two changes (from the previous example):
- First, it changes the trigger key to the
shiftkey, and the
Mkey (all held together).
- Second, it adds an en dash, in this case triggered by holding
The script can be expanded to create trigger keys which deploy other characters that are not on the keyboard, so for instance, I have another key set to trigger an ellipsis.
If you want to know more about trigger keys, you can read the article on the AutoHotkey help pages.
I don’t offer any warranty or any support. If this works for you, great! If it doesn’t, then I’m almost certain not to have the skills to help. However, AutoHotkey runs a very active forum where you will likely be able to find assistance.