There's almost no punctuation mark as useful as the em dash—that long, hyphenesque symbol that you can use in place of commas, parentheses, colons, or quotation marks. Long-time readers already know I'm a fan, since I sprinkle em dashes throughout my text with little restraint.
Seems like something that should be easy to type. And on the Mac, it is: hold down SHIFT and OPTION while typing a hyphen (minus sign) and Bob's your uncle.1 On Windows and Linux computers, though, you end up in a forest of numbers. This has to do with the history of text on computers.
In 1963, the American Standard Code for Information Interchange (ASCII) was published, creating a standard way for computers to represent text. There were initially 128 ASCII codes, including upper- and lowercase letters, numbers, some punctuation, and a few control codes including a beep or bell code.2
The em dash was not part of the ASCII standard.
In the 1980s, Microsoft created "Alt codes," which allowed the user to enter symbols and punctuation not included in the ASCII standard by holding down the ALT key and typing a number on the number pad. At the same time, others were working on ways of encoding larger lists of characters. In 1988, a Xerox employee named Joe Becker published a paper outlining a universal, international character system called Unicode.
Microsoft Alt codes maintained a strong foothold, and Microsoft doubled down on them when it released Windows. Meanwhile, in the early days of the web, HTML specified characters outside the ASCII standard with special entity definitions. As early as 1993, the entity —
produced an em dash.
This meant there were at least three ways to type an em dash.
Today, Unicode is almost universal—but Alt codes and HTML entities are still around. In fact, there are now HTML entities that use Unicode. If that weren't enough, Unicode can be represented in decimal or hexadecimal,3 or base-16. Here are a few of the ways to represent an em dash today:
Unicode (decimal): 8212
Unicode (hex): 2014
HTML entity:
—
or—
or—
Microsoft Alt code: ALT+0151
Windows still uses Alt codes, so you can type an em dash by holding down the ALT key and typing 0151 on the numeric keypad. Unfortunately, as many laptops don't include separate number pads, this leaves the majority of users high and dry. In some Windows applications, you can type the hexadecimal Unicode (2014 for an em dash) and then press the CTRL key while typing X. This notably doesn't work in the popular writing application Scrivener, which is very likely a nexus of em dashes. Luckily, there's another way. If you hold the WINDOWS key and type a period (.) you'll see an onscreen picker for emojis and symbols. Click the omega (Ω) to see the grid that contains the em dash.
In Linux, you can hold down CTRL and SHIFT while typing u (for Unicode), then type the hex Unicode number followed by the SPACE or ENTER key. For an em dash, that's CTRL-SHIFT-u, then 2014. You can also define one of the keys on your keyboard as a compose key, which makes entering special characters on Linux much more Mac-like.
Certain software applications and markup languages make things easier. In Microsoft Word, typing two hyphens after a word and then starting the next word with no spaces will put an em dash between the words. In Markdown, three hyphens in a row makes an em dash (as long as they aren't alone on a line).
If all else fails, you can search online for "em dash" and then copy an em dash from one of the results!
The bell code is character number 07. It used to be possible to make a computer beep by holding the CONTROL key and typing G.
Hexadecimal uses 16 numerals to represent each digit: 0–9 and the letters A–F. Instead of a ones column, a tens column, and a hundreds column, for example, hexadecimal has a ones column, a sixteens column, and a two-hundred-fifty-sixes column. In hexadecimal, the number 200 is represented as C8: the digit in the sixteens column is C, and represents twelve sixteens. Twelve sixteens plus eight make 200 in decimal.
And what about the interrobang‽