Chapter 13. Using special characters in GNOME
Chapter 13. Using special characters in GNOME In GNOME, you can use the Compose Key to type special characters from different languages and symbol sets, including those not available on your keyboard. You can enter and view special characters from different languages and symbol sets, making it easy to work with diverse character sets in GNOME. To input these special characters, you can define one of the existing keys on your keyboard as a Compose Key. Once enabled, the Compose Key allows you to type special characters and symbols by pressing multiple keys in a specific sequence. 13.1. Enabling the Compose Key for an individual user You can enable the Compose Key from the Settings menu while logged in as the user. Procedure Click on the Activities button in the upper-left corner of the screen. Type Settings and click on the Settings icon to open the Settings application. In the Settings window, click on Keyboard in the left sidebar. Scroll down and select the Compose Key option. Toggle the slider to enable the Compose Key . Select the key you want to use as the Compose Key. Once you have selected the Compose Key, close the Settings window. Now the Compose Key is enabled, and you can use it to input special characters and symbols by pressing the Compose Key, followed by the corresponding sequence of keys. To see available multi-key sequences for composing special characters, use: Verification Press the Compose Key, then type the sequence of keys for the special character you want to input. For example, to type (c) , press the Compose Key , then press o and c . 13.2. Enabling the Compose Key for another user You can enable the Compose Key for another user with the gsettings utility. Prerequisites Administrative access. Procedure Allow all clients to connect to the X server: Run the following command to set the Compose Key: Replace <username> with the username of the user for whom you want to enable the Compose Key. Replace <compose_key> with the key you want to use as the Compose Key. You can use the ralt option to designate the right Alt key as the Compose Key. To see other Compose Key options that you can use to set up a Compose Key on your keyboard, use: Resets the access control: Verification To check the Compose Key settings for another user, use: Replace <username> with the username of the user for whom you want to check the Compose Key setting. 13.3. Enabling the Compose Key for all users You can enable the Compose Key for all users by creating a dconf configuration file. Prerequisites Administrative access. Procedure Create the /etc/dconf/db/local.d/00-compose-key configuration file with the following content: Replace <compose_key> with the key you want to use as the Compose Key. You can use the ralt option to designate the right Alt key as the Compose Key. To see other Compose Key options that you can use to set up a Compose Key on your keyboard, use: Update the dconf database with the new configuration: Restart your system or log out and log back in to your GNOME session for the changes to take effect. Now the Compose Key is enabled for all users on the system and they can use it to input special characters and symbols by pressing the Compose Key, followed by the corresponding sequence of keys. Verification Press the Compose Key, then type the sequence of keys for the special character you want to input. For example, to type (c) , press the Compose Key , then press o and c . 13.4. Compose Key sequences for special characters The table showcases Compose Key sequences used to input special characters with diacritics or accents in GNOME. Each row displays a Compose Key sequence alongside its corresponding result Table 13.1. Compose Key sequences for special characters Compose Key Sequence Result Compose + ' + letter Letter with acute accent (e, a, n) Compose + ` + letter Letter with grave accent (e, u, o) Compose + " + letter Letter with umlaut or diaeresis (e, o, u) Compose + - + letter Letter with macron (a, e, o) Compose + / + letter Letter with stroke or diacritic (o, l, o) Compose + = + letter Letter with double acute accent (o, u, a) Compose + . + letter Letter with dot above (a, c, d) Compose + , + letter Letter with cedilla (c, s, n) Compose + ^ + letter Letter with circumflex accent (a, e, i) Compose + ~ + letter Letter with tilde accent (a, n, o)
grep "<Multi_key>" /usr/share/X11/locale/en_US.UTF-8/Compose xhost + su - <username> -c "gsettings set org.gnome.desktop.input-sources xkb-options \"['compose:<compose_key>']\"" grep compose /usr/share/X11/xkb/rules/evdev.lst xhost - su - <username> -c "gsettings get org.gnome.desktop.input-sources xkb-options" [org/gnome/desktop/input-sources] xkb-options=['compose:<compose_key>'] grep compose /usr/share/X11/xkb/rules/evdev.lst dconf update