I Discovered the Wonderful Compose Key After 15 Years of Using Linux

Discovering the ever so wonderful compose key after so many years (probably because I never needed it).
Warp Terminal

Sometimes you discover things by accident, even if they were probably there for years.

I had the same case when I discovered that GNOME allowed the use of a compose key and it was available right from the keyboard settings. Eureka moment? Sort of.

Allow me to share my 'discovery,' but before that, let me briefly tell you what a compose key is.

What is a Compose Key?

A compose key followed by two or more keystrokes lets you type special characters and symbols like ® (registered), © (copyright), and à. You do it directly with your keyboard without having to hunt them down online or dig through character maps.

This is particularly helpful for people who type in European languages like French, Swedish, etc on a QWERTY keyboard.

You'll have to enable the compose key first. I am using GNOME desktop environment in this article, but a similar feature should also be available in other desktop environments.

Enable the Compose Key on GNOME

Search and open settings from the GNOME Activities overview.

Search for "Settings" in GNOME Activities overview and open the settings app.
Open Settings

Inside the settings, go to the Keyboard section. Here, you can see an option for Compose Key.

It is set to Layout default in my Ubuntu 24.04 installation using GNOME 46 and was turned off by default in my Arch installation using GNOME 48.

A screenshot of the keyboard settings page in GNOME. The section showing the Compose Key is annotated
Select Compose Key

In any case, go inside the compose key and either enable it (in case it is turned off) or disable the default layout.

A screenshot of the compose settings in GNOME Settings application. Here, enable another key to use as compose key
Set another Compose key

As soon as you do this, you can see that you can now set another key as the compose key.

I set the Right CTRL key as the compose key, as shown in the screenshot above.

🚧
If you are using VirtualBox, do not assign the Right-CTRL key. Because in VirtualBox, it is the host key with some special usage.

That's it. Whenever you need to type some special symbol, first press the Compose key. This changes the cursor to a special look. Enter the code for the character you want to enter.

0:00
/0:17

A small clip showing the working of the compose key in GNOME.

Essential compose key codes

Yes, you need to know the character code. This may seem like an additional burden, but for frequent users, it will soon become muscle memory.

Press the compose key you had set earlier followed by the sequence of characters shown in the left column and it will output the characters in the second column in the table below:

Compose Key Plus Types Character
' a á
" a ä
` a à
a e æ
o o ° Degree symbol
o c ©
o r ®
s o §
t m ™ (Trade Mark)
> > »
< < «
# E ♫ (Beamed Eighth notes)

You can check the official documentation for the X11 library's compose key sequences for a comprehensive list of keys and related character.

Can't Remember? No Worries

The compose key is particularly useful for people who don't want to divert attention from typing and at the same time need to add symbols.

But this alone is not the option. Most modern desktop environments have emoji apps like the GNOME Characters app for GNOME.

Using Emojis on Ubuntu Linux
Ubuntu has a built-in emoji picker and you can use it to insert emoticons in native GTK apps quickly. Here’s how to use it.

If you don't use special characters frequently, you can simply search for them in the GNOME Activity overview.

For example, just search for "copyright" and if the Characters app is enabled, you can see the symbol pop up in the result. Click on it and it is copied to the clipboard and now you can paste it wherever required.

I highly recommend referring to the X11 library's compose key sequences where you can find all the key sequences, even for typing the obscure infinity symbol.

Enjoy the compose key.

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 13 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries 🕵️‍♂️

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

itsfoss happy penguin

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.