Compose key

XFCE keyboard layout settings window, featuring a Compose key option.

A compose key, whether already existent on the computer keyboard or designated to an existent key, is a modifier key used to input a number of characters that are not part of the official keyboard. Upon its use, it signals to the software to interpret the following keystrokes (usually two) as a combination to produce an alternate character. For example, striking Compose, followed by ~, and then n will produce the character ñ; striking Compose, followed by O, and then C will produce the copyright symbol ©.

Key details

The compose key's behavior differs from typical modifier key behavior (such as AltGr) in that, rather than to be held down, it is released before typing the key(s) that determine the character.

It is more useful to consider it as a kind of dead key. However, in user's mind, a standard dead key “contributes” part of the composite, typically a diacritic, and really, a standard dead key is followed by a character-generating keystroke. These rules require more than one dead key on a keyboard, especially when no chained dead keys are implemented. By contrast, compose keys use to be unique.

Advantage of compose key pops up when compared to single dead key performance. Since the dead key registry (deadlist) starts with a limited set of (typically) simply diacrited characters, added characters input sequences seem cryptic, such as ¨ s for ß. Reminding this one is quasi-automatic since typing German on a non-German keyboard layout needs ¨ dead key all the way long. The compose key instead allows typing Compose s s for ß, thus needing one more keystroke (and one double stroke).

Let's take another example: Vulgar fraction two thirds  U+2154 is most easily entered by Compose 2 3, whereas a single dead key solution turns out to something like ~ w (as ~ 3 would be used for ⅓). Compose key solution is superior by ease of memorizing. Otherwise users need to learn vulgar fractions are e.g. in Tilde Group and scatter down the keyboard.

The disadvantage of compose key is that its use requires one more keystroke whenever the goal is such as composed characters with one or two diacritics, which are more easily entered by dead keys. This limits its appeal to characters that are not typically precomposed ones. Many keyboard layouts [1] provide even direct access to a set of most frequent precomposed characters for locale language support. This highlights that usefulness of compose key grows as targeted characters are more peculiar.

Even if virtually, every dead key may “compose” something if chained (e.g. ~ 2 3 for ⅔, when ⅓ is inserted by ~ 1 3), layout is easier to understand when all complex composed characters are together on one unique dedicated compose key. There are no intrinsic restrictions on combinations, so the use of all printing characters opens the way to lots of most memorable sequences. Thus, compose keys support far greater numbers of characters than dead keys do usually.

On the other hand, the compose key ought to be put into perspective. In fact, especially on operating systems without compose key support, dead keys (whether chained or not) may take over huge sets of characters that would otherwise stay quite unavailable on keyboard. One of them may grow to be the designated “compose key”, since to add an emulation, there is no need to hijack any modifier or Menu key: Every chained dead key may do the job.

Occurrence on keyboards

The compose key can be found on the LK201 family of keyboards from Digital Equipment Corporation and its successors. The key can also be found on keyboards from Sun Microsystems.

Microsoft Windows and OS X do not support a compose key by default, therefore the key does not exist on most keyboards designed for modern PC hardware. When software supports compose key behavior, some other key is used. Common examples are the right-hand Windows key, the AltGr key, Shift+AltGr,[2] or the right-hand Ctrl key.

ISO/IEC 9995-7 designed a graphical symbol for this key, in ISO/IEC 9995-7 as symbol 15 “Compose Character”, and in ISO 7000 “Graphical symbols for use on equipment” as symbol ISO-7000-2021. This symbol is encoded in Unicode as U+2384 composition symbol (⎄) since version 3.0.0 of the standard.[3]

The compose key and compose LED on Sun Type 5 and 6 keyboards is the second-rightmost key on the bottom row.
The compose key on a DEC LK201 keyboard is the leftmost key on the bottom row.
ISO keyboard symbol for “Compose Character”

Software support

Compose keys are most popular on Linux and other systems using the X Window System.[4] On modern Xorg the default setup maps first pressing Shift and then pressing AltGr while Shift is still depressed to the compose key, but pressing AltGr first followed by Shift to the fourth "keyboard level" modifier[5] (the first three levels correspond to holding no modifiers, Shift, and AltGr respectively.) So for example the copyright symbol, © can be typed using the compose key as Shift+AltGr, o, c, or using the level four modifier as AltGr+ Shift+c. As this is rather inconvenient (especially if the keyboard does not have AltGr) it is common to select a keyboard layout making another key such as the right-hand Ctrl or Win into the compose key.

On Microsoft Windows a few programs such as PuTTY provide compose key support. There are also a number of open source utilities (such as WinCompose, AllChars, Compose-Keys or Compose) and installable keyboard layouts (such as this one) available that emulate the compose key using a selectable modifier key like Control or AltGr. Such keyboard layouts can be programmed using the Windows Driver Kit.

Common compose combinations

The table shown below contains the current default common compositions for X.Org 7. Other compositions may work, based on the de facto Sun/DEC/Falco standard. For modern systems which support customizable compose sequences and Unicode, the table below is far from complete.[6]

this renders this
' a á
' A Á
" a ä
" A Ä
` a à
` A À
~ a ã
~ A Ã
^ a â
^ A Â
c a ǎ
c A Ǎ
o a å
o A Å
_ a ā
_ A Ā
; a ą
; A Ą
b a ă
b A Ă
Vowels support
most of the above
this renders this
, c ç
, C Ç
O R ®
O C ©
t m
< < «
> > »
" <
" >
' <
' >
. .
. ^ ·
x x ×
- : ÷
^ 0
^ 1 ¹
^ 2 ²
^ 3 ³
1 2 ½
1 4 ¼
3 4 ¾
this renders this
s s ß
s o §
/ o ø
/ O Ø
- d đ
- D Đ
d h ð
D H Ð
~ n ñ
t h þ
T H Þ
a e æ
A E Æ
! ! ¡
? ? ¿
- L £
= E
= Y ¥
/ C
| c ¢
o x ¤
/ / \
o o °

See also

References

External links