How To Type Em And En Dashes Outside Your Word Processor

Justin Pot 26-04-2012

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 CleanText: Text Clean Up & Formatting Tool Online Read More , 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.


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

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

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

  1. L.
    October 31, 2017 at 6:55 pm

    Your article begins with a misuse of the en-dash. En-dash should be used for a range. You wanted to use an em-dash.

  2. Rasmus
    September 2, 2016 at 12:45 am

    You say:

    > Just press it [the compose key], follow by “—”

    Well, where do I find an em-dash key on my keyboard? Do you mean "just press the compose key followed by "-" (hyphen)?

  3. M dash
    February 14, 2016 at 5:31 am

    Your using an n dash where you actually should be using an m dash. The punctuation invoked in this article is wrong.

    • Justin Pot
      February 14, 2016 at 3:58 pm

      Fight me.

    • Justin Pot
      February 14, 2016 at 3:59 pm

      In all seriousness, I prefer the look of the N dash and will use it this way as long as editors allow me.

      • Chippy
        March 9, 2016 at 9:05 pm

        This error is also the first thing that stood out to me and distracted me from the main point of your post.

      • Rasmus (another Rasmus)
        November 3, 2017 at 3:57 pm

        If you are going to use en-dash for inserted points in a sentence, at least surround it with spaces. Otherwise use an em-dash. Otherwise it just looks too much like a hyphen between words and doesn't function to separate the different parts of the sentence.

  4. Kelli Panique
    November 12, 2015 at 8:37 pm

    Thank YOU! I've been trying to figure this out for months. Never would have guessed it would take 5 keystrokes to get one lousy dash. Thanks!

  5. NDillon
    May 8, 2015 at 12:42 am

    Em dashes separate phrases, as in the second paragraph, not em dashes.

  6. The Punctuator
    February 15, 2015 at 11:35 am

    It's very easy on a Mac or any iOS device (iPhone, iPod, iPad) to use
    a hyphen -
    or an N dash –
    or an M dash —
    in whichever program you're or application you're in.

    In Windows, if you're not using Microsoft Word, it's only possible with the ALT key strokes on a desktop computer:
    a hyphen - is already on the keyboard (aka minus sign)
    ALT 0150 for N dash –
    ALT 0151 for M dash —

    It's impossible to get the M or N dashes (outside of Word) on a laptop PC!

    On usage (culled from around the web):
    Hyphen -
    The hyphen is the shortest of the three and is used most commonly to combine words, e.g. compounds such as well-being, advanced-level, and mass-produced.
    It is also used for fractions, e.g. two-thirds.
    Closed compound words like counterintuitive have no hyphen in modern English, except for uncommon combinations that are confusing or ambiguous without a hyphen.
    —Many spell spell electronic mail e-mail, while some drop the hyphen now.
    —A general principle is that two words forming an adjective before a noun use a hyphen, but two words forming an adjective after a noun do not.
    —full-text electronic article
    —The electronic article was presented in full text.
    —Connects grouped numbers, like a phone number in order to separate them like phone numbers (213-555-1212) or social security numbers (123-45-6789).
    —Indicates breaks within words that wrap at the end of a line.
    —Not used for a range of numbers, like a date range.

    N dash –
    —Joins numbers in a range, such as “1993–99” or “1200–1400 B.C.” or “pages 32–37” or open-ended ranges, like “1934–”.
    —Joins words that describe a range, like “July–October 2010” or Spring–Autumn.
    —Used with institutional names that take the following form:
    University of Wisconsin–Madison
    University of Chicago–based

    M dash —
    —Works better than commas to set apart a unique idea from the main clause of a sentence:
    “Sometimes writing for money—rather than for art or pleasure—is really quite enjoyable.”
    —Separates an inserted thought or clause from the main clause, such as:
    “I can’t believe how pedantic Ken is about writing—I mean, doesn’t he have anything better to do?”
    “Hunter strode into the room—was he mad?—and the family stopped and stared.”
    “Computers make everyday punctuation—for reasons that we’ll discuss later—more precise yet more confusing.”
    —Shows when dialogue has been interrupted:
    “I reached in and pulled the spray can out of my pants—” “In front of the police?”
    -Sets off the sources of quotes:
    "In matters of grave importance, style, not sincerity, is the vital thing."
    —Oscar Wilde
    —Can serve as a sort of bullet point for lists.
    —Em dashes also substitute for something missing. For example, in a bibliographic list, rather than repeating the same author over and over again, three consecutive em dashes (also known as a 3 M dash) stand in for the author’s name.
    —In interrupted speech, one or two em dashes may be used: “I wasn’t trying to imply——” “Then just what were you trying to do?”

    Style and usage vary for spaces. Most say not to use a space for the hyphen or the two dashes (M or N), but some say that you use a space for the N dash (but only in cases where most would use the M dash as outlined above). No spaces ever for the M dash.

    Remember, that typewriters only had a hyphen on it, so only typesetters had the luxury of using M or N dashes. Now, however, no one has typewriters and everyone has computers—and if you have a Mac or an iDevice you get all three easily in any program or APP, but if you're on a Windows laptop you don't!

    • Justin Pot
      February 16, 2015 at 3:41 pm

      Thank you so much for this comment! It's basically a better guide than my article. :)

    • zylstra
      November 25, 2016 at 6:50 am

      "It's impossible to get the M or N dashes (outside of Word) on a laptop PC!"

      Not true: Activate number lock and use the numbers surrounding (and on) the "I" key as you would the numbers on a number keypad.

  7. Daniel
    September 26, 2012 at 8:25 pm

    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.

    • Daniel
      September 26, 2012 at 8:31 pm

      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).

    • John Reid
      April 27, 2015 at 1:09 pm

      Using the Compose key:

      EM DASH: - - - (three hyphens)
      EN DASH: - - . (three hyphens, full stop)

      Hope that helps!

  8. Roman
    August 31, 2012 at 2:32 am

    "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
      August 31, 2012 at 2:08 pm

      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.

      • Roman
        September 1, 2012 at 9:38 pm

        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.

      • zylstra
        November 25, 2016 at 6:46 am

        True, but the numbers on the keys surrounding (and including) the "I" key function the same as a number keypad when the number lock is active – at 3east 6n 0y 2eyb6ard. ; )

  9. Kay
    August 4, 2012 at 6:17 pm

    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
      August 5, 2012 at 2:08 pm

      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...

  10. B.
    May 30, 2012 at 6:09 pm

    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
      June 2, 2012 at 3:00 pm

      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.

  11. erasergirl
    April 29, 2012 at 1:18 am

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

  12. YDMickler
    April 27, 2012 at 6:29 am

    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
      April 27, 2012 at 1:50 pm

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

    • Kristofer
      May 6, 2015 at 10:35 pm

      Haha, I doubt everyone else will ever do it, though.