How To Type Em And En Dashes Outside Your Word Processor

Ads by Google

how to type em dashStop avoiding dashes in your writing just because you don’t know how to type them outside of word processors. Learn the proper keyboard shortcuts and you can type these essential parts of the English language in basic text editors, browsers and anywhere else you may need them.

The en dash (–) is my favorite piece of punctuation–it’s perfect for inserting points, like this one–but I’ve been neglecting it in my writing for a couple of years, for a really dumb reason.

What’s my dumb reason? I’ve stopped using Word and Open/Libre Office. I know their shortcut for an em dash–type two dashes between two words and they will transform once you type a space after the second word.

I stopped using word processors when I started writing for the Internet, however, because they add a bunch of nonsense code to my writing. But outside programs with their own shortcut, I never got around to learning how to write em or en dashes. This means the text editors and browsers I now do my writing in are dashless wastelands. There are online tools for creating em dashes, and I’ve resorted to Googling “en dash” and copying the resulting punctuation, though

Not anymore. I’m going to stop restructuring sentences out of laziness, and I’m going to help you do so as well. Here’s how to make your favorite punctuation on your favorite operating system. Keep reading!

Create Em and En Dashes On A Mac!

First up: the easy one. Apple’s operating system OS X comes with a couple of keyboard shortcuts that make typing em and en dash a snap.

Ads by Google

For an en dash (–), use “Option” and “-“. For an em dash (—), use “Option”, “Shift” and “-“.

That’s it! Now let’s see how Microsoft does in comparison.

Create Em and En Dashes on Windows!

Windows users can easily make an em dash if they’re using Word: just type two dashes between two words, as I explained above.

Outside of Word, however, the story is different: you need to use four digit alt codes. You’re going to need a keyboard with a number pad for this–the block of numbers to the right of the arrow keys:

how to type em dash

Laptops without physical number pads can occasionally use the “Fn” key and some letter keys instead of a number keypad–search your keyboard for blue numbers. Lacking that, you may be out of luck.

To create you dash, first put your cursor where you’d like it and hold down the “Alt” button. Now you need to type a four digit code: 0150 for the en dash (–) or 0151 for the em dash (—).

Find more codes for characters here, if you’re interested.

Create Em and En Dashes On Linux!

So Windows makes things a lot more complicated than OS X does. How does Linux compare? As usual for Linux, there are multiple options–two in this case. Also somewhat typical: they’re not as simple as the Mac solution, but both seem less arbitrary than the Windows one.

You can use whichever method you like, but I’ve made an editorial judgement–subtly displayed in the headers below.

The Stupid Way

So it turns out one way to make em and en dashes in Linux is pretty similar to the Windows method outlined above: you need to type four-digit codes. The good news: you don’t need to a number pad to use them.

Here’s what you do: press “Ctl”, “Shift” and “u”. Doing so will create a magical, underlined “u”. When this appears, you can enter a four-character digit to create whatever character you like. For an em dash, type “2013.” For an em dash, type “2014”. Not simple, but doable.

how to type en dash

Want to learn the other codes? Load the “Character Map” program, if your distro came with one. You can find any character here–the code is at the bottom-left of the window (highlighted above).

The Good Way

For two miserable hours I thought the above set of instructions were my fate. I’ve never been so happy to be wrong. Further digging and searching made me aware of the “Compose” key, which makes the creation of many different characters–especially the characters with accents common in French, Spanish and a number of other languages– simple to create.

The compose key also makes typing dashes quick: “Compose” follow by “—” creates an em dash and “–.” creates an en dash.

“But Justin,” I hear you saying, “I don’t have a Compose key on my keyboard. You’re crazy!”

I might be crazy, but you can easily simulate a compose button on your keyboard. In Gnome, KDE or Unity you just need to open the “Keyboard Layout” in your settings menu. Then click “options”, and you’ll be able to map your Compose key.

how to type em dash

Set whatever key you’re fine with losing. I got rid of caps lock–a key that allows me to type passwords incorrectly and do nothing else useful. Voila–you’ve got a compose key! Just press it, follow by “—” for an em dash or “–.” for an en dash.

If you’re interested in creating other characters, check out this awesome list of Compose Key shortcuts.


So there you have it: how to type the en and em dash in any program, using all three major operating systems. I think it’s a little crazy that keyboards don’t come with a built-in way to type these characters–they’re essential to modern English–but it seems a lot about the modern keyboard hasn’t changed much since the age of the typewriter. English has, and today dashes are common.

Which key on the keyboard would you replace with dashes, if you were tasked with re-designing the keyboard? Let me know in the comments below, along with any dash methods I failed to outline above. Thanks!

Image Credit: Keyboard image at top by Mathias Bigge

Ads by Google

12 Comments - Write a Comment



Someone once suggested using four digit alt codes to insert symbols into passwords that no one would be able to guess, like «,›, and of course – and —. I never tried it but it’s an interesting idea.

Justin Pot

That is interesting. Like all password strategies, it would work well until everyone else does it.



Allchars, tiny program BIG time lifesaver….it runs on startup
and creates all your special characters with three key combos
that are easily remembered…
¢ is Ctrl + c + / easy…



Just a note, your using en dashes improperly: en dashes are for number ranges, while em dashes are used to break up sentences. You should not be using en dashes to break up sentences.

Justin Pot

That’s been a subject of controversy at every newspaper I’ve worked at. The AP stylebook doesn’t distinguish between the em and the en dash, so it becomes an aesthetic choice. I personally prefer an en dash surrounded by spaces, and Mark (the editor here) never corrects me. So that’s what I do.



Maybe Mark wasn’t at work that day? “To create you dash…” needed his attention, and there weren’t any spaces surrounding the en dash in the first para of your Conclusion. Thanks for the info – its something that bothers me too. Wish we could all decide on a style. Of course, lots of people just don’t see a problem, and think hyphen is a naughty word.

Justin Pot

Yeah, that’s embarrassing. Try as both I and Mark do to correct all grammatical mistakes some do slip through. As for dashes, I actually don’t know what he thinks…



“Laptops without physical number pads can occasionally use the “Fn” key and some letter keys”

All laptops have a row of numbers right below the function key row, just as desktop keyboards do, and usually Fn key doesn’t need to be pressed.

Also, NONE of your dashes are surrounded with spaces despite your stated preference to have them.

Justin Pot

Those numbers won’t work: you must use the keypad ones. Stupid, but true.

I stated my preference, and the editors stated theirs by deleting my spaces. They’re wrong, though.


Wow, you are right – those numbers don’t work. Stupid, indeed.

Please pass this to your editors: when a dash isn’t surrounded by spaces, the dash appears to connect parts of a complex word, which isn’t what you intended in your article. For example, “characters–especially”, “dash–type”, “keypad–search”. It is the hyphen that shouldn’t have spaces around it in normal sentences, not dash. Please tell the editors that their preference makes it more difficult for the readers to consume the fruits of their editing labor.



I’m not really following this statement :
“Compose” follow by “—” creates an em dash and “–.” creates an en dash.

That basically reads: “Compose” followed by {em dash} creates an em dash and “Compose” followed by {en dash} creates an en dash.

For me, it appears to be: “Compose” followed by “—” (three hyphens) creates an em dash. I haven’t been able to create an en dash using this method – only via the ctrl-shift-u method.


Ah, I see. The site is translating three hyphens into an em dash for you. Either way, I’m guessing Compose plus two hyphens for you creates an en dash, not for me though (Centos 6.3).

Your comment