13.3. Enabling the Compose Key
The
Compose key
is a feature that enables you to type special symbols or characters not found on your keyboard. In GNOME Desktop, you can define one of the existing keys on your keyboard as the Compose key
. The Compose key
is used in combination with other keys, known as Compose key sequences, to enter special characters you type frequently.
Example 13.1. Using Compose Key
If you press and release the
Compose key
, then type AE (in capitals), you will get "Æ". If you type the letters in lower case, you get "æ".
To enable the
Compose key
and configure a certain key on your keyboard as the Compose key
, set the org.gnome.desktop.input-sources.xkb-options
GSettings key. That way, the setting will be enabled by default for all users on your system. (For more information on GSettings keys, see Section 9.6, “GSettings Keys Properties”.)
Procedure 13.3. Setting the Right Alt Key as the Compose Key
- Create a
local
database for machine-wide settings in/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 that key as specified in the xkeyboard-config(7) man page, section Compose key position. - Override the user's setting and prevent the user from changing it in
/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 the changes to take effect:
#
dconf update
- Users must log out and back in again before the system-wide settings take effect.
Now, you can start using the Right Alt key as the
Compose key
. Just press and release the Compose key
and then type the key combination to get the specific symbol.
Note
If you, as a system administrator, set the lock on after editing the local database, users will not be able to add other xkb options. The lock prevents users from setting a key combination like Alt+Shift to switch keyboard layouts.