Insert an ndash and other special characters using the Compose key on Linux
First, make sure you have a compose key configured.
Configuring a compose key
I suggest using the "Menu" key which is located between the right Meta and Ctrl key.
- Ubuntu / MATE
- Control Center → Keyboard → Layout → Options → Position of Compose Key
- Ubuntu / Gnome
- On Gnome 2: System → Preferences → Keyboard → Layouts → Options → Compose key.
On Gnome 3: Settings → Keyboard → Shortcuts → Typing → Compose Key.
- Xubuntu / Xfce / Any window manager
- Xfce does not offer a settings screen for this, but you can use this command ("menu" is the context menu key; other people may prefer "lwin" or "rwin" instead):
setxkbmap -option compose:menu
Add that command the list of started applications on Xfce to set it every time your window manager is started (in Settings manager / Session and Startup / Application Autostart / Add).
Using the compose key
To insert special characters press (and release) your compose key, then input a combination. For example use "
--." to create an en-dash or "
Note that this works across all programs – unlike the Ctrl+Shift shortcut which works only on Gnome applications.
List of compose keys
For the full list of compose keys see
/usr/share/X11/locale/<locale>/Compose. All entries starting with
<Multi_key> are compose keys.
Setting up 3rd level shift key
Although the compose key works just fine for umlauts, it might break your typing flow if you're touch typing. You could add another level of keyboard shortcuts that allows you to quickly type e.g. umlauts via
AltGr+o. You could do that via Xmodmap (if you want to do it this way, you'll already know how) or follow these instructions to modify the
us symbol table: Umlaute auf der englischen Tastatur tippen.