How can I type a Unicode character (for example, em-dash —?)
- Ctrl+Shift+U, then 2 0 1 4 and Enter
or
- 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 Enter.
If this shortcut doesn't work check if your input method is iBus.
I could not find a way to type it using AltGr and default settings, but I found another way:
Go to System -> Preferences -> Keyboard.
Select the Layouts tab.
Click Options.
Under Compose Key Position (drop-down), choose a key to use for composing — I chose the Right Win (right Windows key).
Now press and release the compose key, then type
---
to get the em-dash.
[Here's a list of more characters you can type this way.]
UPDATE: As of Ubuntu 12.04
Go to System Settings > Keyboard.
Under Typing tab, select Layout Settings link (at the bottom of the dialog box).
Click Options.
Under Compose key position (drop-down), choose a key to use for composing — I chose the Right Win (right Windows key).
Now press and release the compose key, then type
---
to get the em-dash.
Go to Applications->Accessories->Character Map.
Click Search->Find
Type 'em dash' and click 'Find Next'
Double click the symbol, which will put it in the 'Text to Copy' box at the bottom.
You can then copy-and-paste it where you want it.