Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 14. 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.
14.1. Enabling the Compose key for an individual user with the Tweaks application Copier lienLien copié sur presse-papiers!
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
# yum install gnome-tweaksCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Procedure
- Open the Tweaks application.
- Select Keyboard & Mouse in the side bar.
- Enable Compose Key.
Choose which key from the listed keys triggers the Compose functionality.
14.2. Enabling the Compose Key for another user Copier lienLien copié sur presse-papiers!
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:
xhost +
# xhost +Copy to Clipboard Copied! Toggle word wrap Toggle overflow Run the following command to set the Compose Key:
su - <username> -c "gsettings set org.gnome.desktop.input-sources xkb-options \"['compose:<compose_key>']\""
# su - <username> -c "gsettings set org.gnome.desktop.input-sources xkb-options \"['compose:<compose_key>']\""Copy to Clipboard Copied! Toggle word wrap Toggle overflow 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 theraltoption 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:
grep compose /usr/share/X11/xkb/rules/evdev.lst
$ grep compose /usr/share/X11/xkb/rules/evdev.lstCopy to Clipboard Copied! Toggle word wrap Toggle overflow Resets the access control:
xhost -
# xhost -Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
To check the Compose Key settings for another user, use:
su - <username> -c "gsettings get org.gnome.desktop.input-sources xkb-options"
# su - <username> -c "gsettings get org.gnome.desktop.input-sources xkb-options"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
<username>with the username of the user for whom you want to check the Compose Key setting.
14.3. Enabling the Compose key for all users Copier lienLien copié sur presse-papiers!
To enable the Compose key for all users, follow these steps.
Procedure
-
Open the
/etc/dconf/db/local.d/00-input-sourcesfile as therootuser. Enter the following content in the file:
[org/gnome/desktop/input-sources] # Enable the Compose key xkb-options=['compose:selected-key']
[org/gnome/desktop/input-sources] # Enable the Compose key xkb-options=['compose:selected-key']Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace
selected-keywith the key that triggers Compose. For example, useraltto set the right Alt key.To override the user’s Compose settings and prevent the user from changing them, create the
/etc/dconf/db/local.d/locks/input-sourcesfile and enter the following:# Lock the list of enabled XKB options /org/gnome/desktop/input-sources/xkb-options
# Lock the list of enabled XKB options /org/gnome/desktop/input-sources/xkb-optionsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Update the system databases for the changes to take effect:
dconf update
# dconf updateCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Users must log out and back in again before the system-wide settings take effect.
14.4. Compose Key sequences for special characters Copier lienLien copié sur presse-papiers!
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
| Compose Key Sequence | Result |
|---|---|
| Compose+'+letter | Letter with acute accent (é, á, ñ) |
| Compose+`+letter | Letter with grave accent (è, ù, ò) |
| Compose+"+letter | Letter with umlaut or diaeresis (ë, ö, ü) |
| Compose+-+letter | Letter with macron (ā, ē, ō) |
| Compose+/+letter | Letter with stroke or diacritic (ø, ł, ǿ) |
| Compose+=+letter | Letter with double acute accent (ő, ű, ȁ) |
| Compose+.+letter | Letter with dot above (ȧ, ċ, ḋ) |
| Compose+,+letter | Letter with cedilla (ç, ş, ņ) |
| Compose+^+letter | Letter with circumflex accent (â, ê, î) |
| Compose+~+letter | Letter with tilde accent (ã, ñ, õ) |