8 Answers
8

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

Works for me. Didn't need to press enter though, the — appears as soon as i release ctrl and shift.
–
Alistair BuxtonMar 21 '11 at 3:25

7

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.
–
sladenMar 21 '11 at 3:29

Yowza, that's nice: type any Unicode character on codepoint. If only it had a character search capability.
–
Humphrey BogartMar 21 '11 at 12:51

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.)
–
trenchAug 31 '11 at 22:39

I prefer remapping one of my lesser-used keys to an em-dash so that I don't have to type a crazy combination of keys in order to get it.

Identify a key you don't mind remapping. My laptop has a second backslash key, so I used that.

Find the keycode for that key using xev. Run xev from a terminal, and press the key, paying attention to the keycode that pops up. When I press my key, for instance, I get state 0x0, keycode 94 (keysym 0x3c, less), same_screen YES,, so I know my keycode is 94.

Assign the emdash to that keycode using xmodmap. I run xmodmap -e "keycode 94 = emdash ellipsis" because I also want to assign Shift+backspace to the ellipsis character.

Figure out a way to get xmodmap to run on startup. This is the part I'm unsure about. I think it involves editing ~/.Xmodmap, but there's some debate about this, apparently.

To get xmodmap to run on startup in Ubuntu 12.10, Go to Dash Home. Type in Startup. Click on Startup Applications. Click Add. In the "add startup program" window, give it a name. In the command box, enter: xmodmap -e "keycode 94 = emdash ellipsis"

Then, click on Add. You'll see the program name you just gave this under startup applications. Close the windows. The command will run the next time you start the computer. (I just spent a week and many hours reading these posts here and finally figured it out on my own.) This might not be the best way to do this, but it works.