Chapter 12. 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.

12.1. Enabling the Compose key

You can enable the Compose key either for an individual user or for all users.

12.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

  1. Open the Tweaks application.
  2. Select Keyboard & Mouse in the side bar.
  3. Enable Compose Key.
  4. Choose which key from the listed keys triggers the Compose functionality.

    enabling compose key

12.1.2. Enabling the Compose key for an individual user using GSettings

To enable the Compose key for an individual user using the gsettings utility, follow these steps.

Procedure

  • Enable the Compose key:

    $ gsettings set \
                org.gnome.desktop.input-sources \
                xkb-options \
                "['compose:selected-key']"

    Replace selected-key with the key that triggers Compose. For example, use ralt to set the right Alt key.

Additional resources

  • See the xkeyboard-config(7) man page for the names of other keys.

12.1.3. Enabling the Compose key for all users

To enable the Compose key for all users, follow these steps.

Procedure

  1. Open the /etc/dconf/db/local.d/00-input-sources file as the root user.
  2. Enter the following content in the file:

    [org/gnome/desktop/input-sources]
    # Enable the Compose key
    xkb-options=['compose:selected-key']

    Replace selected-key with the key that triggers Compose. For example, use ralt to set the right Alt key.

  3. To override the user’s Compose settings and prevent the user from changing them, create the /etc/dconf/db/local.d/locks/input-sources file and enter the following:

    # Lock the list of enabled XKB options
    /org/gnome/desktop/input-sources/xkb-options
  4. Update the system databases for the changes to take effect:

    # dconf update
  5. Users must log out and back in again before the system-wide settings take effect.

Additional resources

  • See the xkeyboard-config(7) man page for the names of other keys.

12.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

  1. Press and release the Compose key.
  2. Type the key combination to get the specific symbol. For example, type A E (in capitals) to get Æ, or in lowercase to get æ.

12.3. The Compose key sequences

This section lists some of the Compose key sequences and their resulting characters.

Table 12.1. Common sequences

First keySecond keyThird keyResult

o

c

 

©

d

h

 

ð

,

a

 

ą

s

s

 

ß

<

<

 

«

?

?

 

¿

-

-

-

^

_

a

ª

=

c

 

1

4

 

¼

Additional resources

  • For more key sequences, see the X.Org webpage.