Difference between revisions of "Accents on US keyboards"

From ArchWiki
Jump to: navigation, search
(fix double redirect)
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
#REDIRECT [[Keyboard configuration in Xorg#Configuring_compose_key]]
[[es:Accents on US keyboards]]
Typing in foreign languages such as French, Italian and German can be difficult on an American keyboard. To remedy this, [[Xorg]] provides options such as the compose key and the [[xmodmap]] utility.
== XCompose ==
The compose key, when pressed in sequence with other keys, produces a Unicode character. E.g., in most configurations pressing {{ic|<Compose> ' e}} produces {{ic|é}}.
Compose keys appeared on some computer keyboards decades ago, especially those produced by Sun Microsystems. However, it can be enabled on any keyboard with {{Ic|setxkbmap}}. For example, compose can be set to right alt by running:
setxkbmap -option compose:ralt
If you want another key to be your Compose key, see {{Ic|/usr/share/X11/xkb/rules/base.lst}} at the {{Ic|compose:}} lines.
You may also edit your {{Ic|/etc/X11/xorg.conf.d/10-evdev.conf}} and change InputClass / 'evdev keyboard catchall' to look like this.
Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "XkbOptions" "terminate:ctrl_alt_bksp,compose:ralt"
=== Key combinations ===
By default, the compose key uses combinations defined in a file. The file used depends on the user's locale: an American using LC_CTYPE=en_US.UTF-8, for instance, would find the defaults in {{Ic|/usr/share/X11/locale/en_US.UTF-8/Compose}}.
Some of the default combinations are listed below:
Compose ` a : à
Compose ' e : é
Compose ^ i : î
Compose ~ n : ñ
Compose / o : ø
Compose " u : ü
Compose o c : ©
Compose + - : ±
Compose : - : ÷
However, you can define your own compose key combinations by copying the default file to {{Ic|~/.XCompose}} and editing it. The compose key works with any of the thousands of valid Unicode characters, including those outside the Basic Multilingual Plane.
=== Environment variables ===
Some unfriendly applications (including many GTK apps) will override the compose key and default to their own built-in combinations. You can typically fix this by setting environment variables; for instance, you can fix the behavior for GTK with:
export GTK_IM_MODULE=xim
== xmodmap ==
The {{Ic|xmodmap}} utility that is supplied with [[Xorg]] allows user to completely remap the keyboard. See [[xmodmap#Accents on US keyboards]] for more information.

Latest revision as of 20:44, 27 March 2014