The title pretty much says it all: how can I type an em-dash (—)?

link|improve this question
feedback

4 Answers

up vote 17 down vote accepted
  • Ctrl+Shift+U, then 2 0 1 4 and Enter

  • Ctrl+Shift+U+2014

Control-capital-u means Unicode, and the four-digit hexadecimal number for em dash (or any other Unicode character) can be found via the Character Map in Ubuntu (gucharmap).

The first option allows you to separately type the correct digits for your character, which appears upon hitting Enter or Space. You can also edit the numbers you typed using backspace before pressing Return.

link|improve this answer
3  
Works for me. Didn't need to press enter though, the — appears as soon as i release ctrl and shift. – Alistair Buxton Mar 21 '11 at 3:25
3  
Yes, if you keep Ctrl+Shift held the whole time while typing the numbers, then it will appear immediately. If you release them before typing the numbers (which allows you to also use backspace) then a Space or Enter is required to show the end of the Unicode number input process. – sladen Mar 21 '11 at 3:29
Yowza, that's nice: type any Unicode character on codepoint. If only it had a character search capability. – Beau Martínez Mar 21 '11 at 12:51
@Beau, use the Character Map to search. – Oxwivi Apr 4 '11 at 20:14
Well, I've been using this method for the last few months and it's worked like a charm! – Beau Martínez Jun 25 '11 at 16:27
feedback

I could not find a way to type it using AltGr and default settings, but I found another way:

System->Preferences->Keyboard

Select the "Layouts" tab

Click "Options"

Find the "Compose Key Position" and expand it.

Choose a key to use for composing (I chose right windows key).

Press and hold the compose key and type "---"

List of more characters you can type this way:

http://www.hermit.org/Linux/ComposeKeys.html

link|improve this answer
2  
Note that there is no need to hold the compose key after it was pressed. – Sam Hocevar Mar 21 '11 at 7:19
feedback
  1. Go to Applications->Accessories->Character Map.

    enter image description here

  2. Click Search->Find

    enter image description here

  3. Type 'em dash' and click 'Find Next'

    enter image description here

  4. Double click the symbol, which will put it in the 'Text to Copy' box at the bottom.

    enter image description here

  5. You can then copy-and-paste it where you want it.

    enter image description here

link|improve this answer
2  
Or you could just bookmark this page and copy and paste it from the question :) – Alistair Buxton Mar 21 '11 at 0:32
2  
Setting up compose keys is much easier than having to use the character map every time you want a special character. – jrtayloriv Mar 21 '11 at 0:38
@jrt: It allows you to insert the character without altering your keyboard layout. Not everyone wants to change their layout just to type a dash. – George Edison Mar 21 '11 at 0:42
lol @ comments! – MestreLion Mar 21 '11 at 4:44
I wasn't aware that the Character Map had a search option until reading this. Not sure if I'll ever use it, but +1 for enlightening us. (Please vote to delete the "answer" I left below... it was supposed to be a comment here.) – trench Aug 31 '11 at 22:39
feedback

The following keyboard layouts contain the em dash:

$ sgrep -o '%r\n' '"\"" _quote_ "\"" in ("name[Group1]" .. "\n" in outer("{" .. "}" containing "emdash"))' /usr/share/X11/xkb/symbols/??
Azerbaijan
Bulgaria
Bulgaria - Traditional phonetic
Switzerland - German (Macintosh)
Germany
Germany - Neo 2
Finland
France - Bepo, ergonomic, Dvorak way
France - Macintosh
Ireland
Iceland - Macintosh
Iceland - Dvorak
Latvia
Mongolia
Norway
Norway - Northern Saami
Ukraine
USA - Macintosh
USA - Colemak

Personally, I use Colemak, in which the em dash is AltGr+Shift+-.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.