I found out on Mastodon recently that the Compose key exists, allowing you to enter special characters using easy-to-remember key sequences (e.g. “<compose>/=” gives you “â‰ “).
To do this on Ubuntu (and probably many other systems), hold SHIFT, then press AltGr, release them both, and type something like “/=”. You should see the â‰ symbol appear.
In Ubuntu MATE, you can customise what key is the compose key by opening “Keyboard”, clicking “Layouts”, then “Options…” and checking a box under “Position of compose key”. I checked “Right Alt”, meaning my “AltGr” key is now the compose key.
More info: Ubuntu ComposeKey docs.
Want to explore? See the list of the default sequences you can type.
6 thoughts on “Ubuntu “compose” key for easy unicode character input”
Sounds cool, but doesn’t seem to work in Ubuntu 16.04. Maybe it only works with a specific locale or xkeyboard layout?
Hi Albert, I’m surprised to hear it doesn’t work for you, what a pity. Are you sure you pressed SHIFT and ALT GR together, then released them and then pressed “/=”?
Found the problem. In System Settings / Keyboard / Shortcuts / Typing, I had “Compose Key” set to Disabled. The help text underneath says “To edit a shortcut, click the row and hold down the new keys …”. That doesn’t work, even though it does for other shortcuts. However, clicking on Disabled gives a menu with no Shift-AltGr, but with “Right Alt” among others. After selecting that, it works (both with just AltGr, or Shift-AltGr). Thanks for this cool tip.
Brilliant, thank you!
Bad news: the Compose Key was disabled on my system for a good reason. If I set it to AltGr, I can no longer use it to type the various characters and accents which require it.
So I guess this Compose Key trick only applies to a plain US keyboard layout. Sounds very useful for Americans, but only for Americans.
Thanks anyway. It was intersting, and may be useful if I’m stuck some day in some Internet cafÃ© with a US layout.
Sorry to hear that. It works on a UK keyboard too. You could try re-mapping it to a different key entirely?