Compose key

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Xfce keyboard layout settings window, featuring a Compose key option.

A Compose key, also called Multi key, is a part of the computer keyboard that is—or behaves like—a kind of special dead key. Thus, unlike a modifier key, which must be held down, the Compose key can be released before the following key stroke. The effect of the Compose key is to convert to a dead key every specified key that is pressed after it. The next (or even a later) keypress triggers the insertion of an alternate character, typically a precomposed character or a symbol.[1]

Key details[edit]

On the keyboard[edit]

Being a dead key, the Compose key only needs one key position. This is ideally in the Base shift state, while the other key positions may be attributed to other characters or dead keys.[2] On the other hand, with respect to compact keyboards, the Compose key may also be hidden in one of the present classic dead keys, for example ^Q. More generally, any dead key may be programmed to compose much more than what it is expected to produce, a principle that is already used for multiply diacriticized characters. Having one dedicated Compose key on every keyboard, regardless of the number of other dead keys, proves however to be the most useful option.[3]

For ergonomics, the preferred place for the Compose key is Right Alt, especially on keyboards that do not use Right Alt as AltGr. If they do, the user might eventually prefer to have Compose on Left Alt, which was already the place used first in history (an option that today should lead to place the lefthand Alt on Left Win, and this on Menu, so that the reality-based prioritization of these keys would match the order of removal on compact keyboards, where an Menu key is often found but not Right Win). Alternately, the Compose key may be placed on Right (or left) Ctrl, but this is poor ergonomics because the little finger used then for Compose, is also to hit many other keys which are likely to occur next in sequence. The problem is the same if Compose is placed on Caps Lock, a key which if disliked, would better host the left Win key rather than any most frequently used key as Compose will be.

At typing[edit]

As actual keyboards can manage key rollover, the Compose key does not really have to be released before the subsequent keystrokes. This makes it possible for experienced typists to enter composed characters rapidly. The typing speed is increased if the Compose key can be acted with one thumb while other fingers are already about to hit the keys of the sequence.

Compose sequences[edit]

At the beginning, the Compose sequences followed handwriting and the overstrike technique. For example, striking Compose, followed by n, and then ~, produced the character ñ. This order is still in use,[4] but multidiacriticized characters are hard to obtain this way.

The inverse order is known from standard dead keys as present on the last typewriters and as used today on computer keyboards: Compose~n for ñ.[5] Likewise, striking Compose, followed by O (or o), and then C (or c), will produce the copyright symbol ©. This allows typing Compose^'a, for .

There is no intrinsic limit on combinations or sequence length, which only should respect the rules of mnemonics and ergonomics. For example, U+278C dingbat negative circled sans-serif digit three might be inserted when the following sequence is typed: Compose@%$3. This example is based on the use of @ for all circled characters, % after @ for all negative circled (displaying in white on a colored disk) and $ for sans serif. The choice of % for "negative" can be made with respect to ergonomics on a U.S. English keyboard. For UK, the whole sequence could be Compose@-=3.

Key name[edit]

Despite its name, the Compose key and the software that supports it don't really compose anything, unlike the old overstrike technique that allowed to literally compose diacriticized characters. The key might as well be called a "super dead key". Nevertheless, its name says very well the principle of the mnemonics that makes Compose so useful to increase the number of available characters without urging users to learn any set of more or less complicated codes. Here's another example: Compose<3 for ♥.[4] In Alt+NumPad ASCII, it's Alt+3, one of the exceptions among the hard-to-learn ASCII codes for precomposed characters and punctuation.

Compose key vs classic dead key[edit]

The advantage of a 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 diacriticized characters, supplemental characters’ input sequences seem cryptic, such as ¨S for ß. Reminding this one is quasi-automatic because typing German on a non-German keyboard layout needs a ¨ dead key all the way long. The Compose key instead allows typing ComposeSS for ß, thus needing one more keystroke (two of them being eventually a double stroke).

Let's take another example: U+2154 vulgar fraction two thirds is most easily entered by Compose23, whereas a single dead key solution turns out to be something like ~W (as ~3 would be used for ⅓). Therefore, the Compose key solution is easier to remember. Otherwise, users need to learn that vulgar fractions are in what may conveniently be called the Tilde Group, and scatter down the keyboard.

The disadvantage of the 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 the input of characters that are not typically precomposed, or at least, that may not be obtained with a number of dead keys. Effectively, many keyboard layouts[6] provide direct access to a set of most frequent precomposed characters for locale language support. This highlights that the usefulness of a Compose key grows as targeted characters are more peculiar and not currently occurring in the local script.

Even if virtually, every dead key may "compose" something if chained (e.g. ~23 for ⅔, when ⅓ is inserted by ~13), the keyboard 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.

Key history[edit]

The Compose Character key[7][8] was introduced by engineers at Digital Equipment Corporation (DEC) on the LK201 keyboard, available since 1983 with the VT220 terminal.[9] Its virtual key name was META.[10] The keyboard included an LED indicating that a Compose sequence is on-going. This was placed in the LED flag row, above the Do key, which was placed together with a Help key above the six miscellaneous commands and the inverted T keys.[11]

In 1987, Sun Microsystems released the Sun4, the first dedicated Unix workstation that had a Compose key.[9] On the keyboards of Sun Type 5 and 6 workstations, the Compose LED is placed in the keycap (see picture below).

While the group of command keys between the alphanumerical block and the numerical keypad, and the "inverted T" arrangement of arrow keys, both innovations also first provided on the DEC keyboard, have become world standard,[12] the Compose key by contrast disappeared, because it has not been copied by IBM and Apple Inc. At its place, we find today double modifier and system keys filling up the bottom row of our keyboards. Consequently, a move to reimplement the Compose key based on individual projects lead to a panel of OS related and freeware solutions, among which a number of utilities and keyboard drivers.[3][9][2]

Occurrence on keyboards[edit]

The Compose key is found on the LK201 family of keyboards from DEC and its successors. The key is also found on keyboards from Sun Microsystems.

Because Microsoft Windows and OS X do not support a Compose key by default, the key does not exist on most keyboards designed for modern PC hardware. When software supports compose key behaviour, some other key is used. Common examples are the right-hand Windows key, the AltGr key, Shift+AltGr,[13] 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.

Software support[edit]


The Compose key is most popular on Linux and other systems using the X Window System.[14] X header files call the Compose Key the "Multi_key". On Xorg the default Compose Key is Shift+AltGr, while pressing AltGr before Shift is the "fourth keyboard level modifier". As this is rather inconvenient (especially for keyboards without an AltGr) it is common to select a keyboard layout where another key such as the right-hand Ctrl or Win is mapped to the Compose key, this option is normally available in the settings of the desktop environment. Additionally, the X keyboard driver does not allow the key used for Compose to also function as a modifier.[citation needed]


On Microsoft Windows a few programs such as PuTTY provide Compose key support. To emulate the Compose key for all software, keyboard shortcut utilities are often involved. There are also a number of open source utilities (such as WinCompose, AllChars, Compose-Keys or Compose). Installable keyboard layouts (such as this one) are available that contain a Compose key assigned to one of the keys like Ctrl or AltGr. They work by using the dead key chaining feature that is more commonly used to input letters with multiple diacritics. Such keyboard layouts can also be programmed directly in C which is the language Windows drivers are written in, compiled using the free of charge Windows Driver Kit, and packaged using the free of charge Microsoft Keyboard Layout Creator 1.4, compatible up to the latest versions of the OS.

Mac OS X[edit]

Although the Cocoa text input system allows entry of many alternate and accented characters natively in OS X,[2] a "true" Compose key solution isn't built in. At least one has been implemented using the KeyRemap4MacBook utility.[4] That works with all applications, as does the use of keyboard drivers where Compose is implemented using the dead key chaining feature.[2]


The main difference in the Compose key support between Linux and the utilities on Windows and Mac OS X on one hand, and the keyboard driver based solutions on the other hand, is in ease of customization. With the former, the user can edit the keyboard layout file at any time with immediate effect, while a driver needs to be recompiled—a process that is however rather easy to achieve and is worthwhile given the performance of this solution. Indeed, the relevant tables are simply edited in a spreadsheet, repasted into the source, and the newly compiled driver is pasted into the system folder. Alternately, uninstalling the existing driver and installing the new version avoids to have to close all applications and to reboot the machine.

Common compose combinations[edit]

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.[15]

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 Ă
? a
? 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 ð
~ n ñ
t h þ
a e æ
! ! ¡
? ? ¿
- L £
= c
= Y ¥
/ C
| c ¢
o x ¤
/ / \
o o °

See also[edit]


  1. ^ "Linux keyboard text symbols: Compose key shortcuts". FSymbols. 2013-07-24. Retrieved 2015-07-07. 
  2. ^ a b c d Wust, J. 'Mach' (2015-06-29). "U.S. custom Keyboard Layout". SourceForge. Retrieved 2015-07-07. 
  3. ^ a b "Compose key on Windows". Retrieved 2015-07-07. 
  4. ^ a b c "Setting up a real Compose key on Mac OS X". Lol Engine. 2012-06-18. Retrieved 2015-07-07. 
  5. ^ "Enter european accented characters on an american keyboard". ZoneO Software. June 2006. Retrieved 2015-07-07. 
  6. ^ "Windows Keyboard Layouts". Microsoft Developer Network. 
  7. ^ "p1060628". WickensOnline. 2007. Retrieved 2015-07-07. 
  8. ^ "LK201_large_keycodes.jpg" (JPEG). The NetBSD Project. Retrieved 2015-07-09. 
  9. ^ a b c "Add a Virtual Compose Key to Your PC". Windows.Appstorm. Retrieved 2015-07-07. 
  10. ^ "LK201 Keycodes and Keyboard Divisions". The NetBSD Project. Retrieved 2015-07-09. 
  11. ^ "p1060631". WickensOnline. 2007. Retrieved 2015-07-07. 
  12. ^ Burrows, Jim (2009-09-21). "Inverse-T History". Nerd Corner. Retrieved 2015-07-09. 
  13. ^ "Compose Key". Ubuntu. Retrieved 2012-07-10. 
  14. ^ van Geloven, Sander (2012). Compose Key Sequence Reference Guide 2012. Utrecht, the Netherlands: Hellebaard. ISBN 1-4681-4110-4. 
  15. ^ Monniaux, David. "UTF-8 (Unicode) compose sequence". Retrieved 2015-07-15. 

External links[edit]