Chapter 10. Inputting uncommon characters using the Compose key
The Compose key is a feature that enables you to type special symbols or characters which are missing on your keyboard. In GNOME Desktop, you can define one of the existing keys on your keyboard as the Compose key. You can use the Compose key in combination with other keys, known as Compose key sequences, to enter special characters you type frequently.
10.1. Enabling the Compose key
You can enable the Compose key either for an individual user or for all users.
10.1.1. Enabling the Compose key for an individual user with the Tweaks application
To enable the Compose key for an individual user by Tweaks application follow these steps.
Prerequisites
The Tweaks application is installed on your system.
# yum install gnome-tweaks
Procedure
- Open the Tweaks application.
- Navigate into Keyboard & Mouse - Compose Key, and enable it.
Choose which key will be used as the Compose key from the listed keys.
10.1.2. Enabling the Compose key for an individual user using GSettings
To enable the Compose key for an individual user by gsettings command follow these steps.
Procedure
Enable the Compose key and set the compose character to right alt.
$ gsettings set org.gnome.desktop.input-sources xkb-options "['compose:ralt']"
If you want to set a different key than right alt, replace ralt with the name of the key as specified in the
man xkeyboard-config(7)
.
10.1.3. Enabling the Compose key for all users
To enable the Compose key for all users follow these steps.
Procedure
Create a
local
database for machine-wide settings and enter the following:# vim /etc/dconf/db/local.d/00-input-sources
[org/gnome/desktop/input-sources] # Set the Right Alt key as the Compose key and enable it xkb-options=['compose:ralt']
If you want to set a different key than right alt, replace ralt with the name of the key as specified in the
man xkeyboard-config(7)
.To override the user’s settings and prevent the user from changing it, create a file
/etc/dconf/db/local.d/locks/input-sources
and enter the following:# vim /etc/dconf/db/local.d/locks/input-sources
# Lock the list of enabled XKB options /org/gnome/desktop/input-sources/xkb-options
Update the system databases for changes to take effect:
# dconf update
- Users must log out and back in again before the system-wide settings take effect.
10.2. Using the Compose key to input characters
This procedure shows how to use the Compose key.
Prerequisites
- The Compose key is enabled on your system.
Procedure
- Press and release the Compose key.
- Type the key combination to get the specific symbol. For example, type A E (in capitals) to get Æ, or in lowercase to get æ.
10.3. The Compose key sequences
This section shows some of the Compose key sequences.
Table 10.1. Common sequences
First key | Second key | Third key | Result |
---|---|---|---|
o | c | © | |
d | h | ð | |
, | a | ą | |
s | s | ß | |
< | < | « | |
? | ? | ¿ | |
- | - | - | — |
^ | _ | a | ª |
= | c | € | |
1 | 4 | ¼ |
Additional resources
For more sequences refer to the X.Org webpage.