
Acompose key (sometimes calledmulti key) is a key on acomputer keyboard that indicates that the following (usually 2 or more) keystrokes trigger the insertion of an alternate character, typically aprecomposed character or a symbol.[1]
For instance, typingCompose followed by~ and thenn will insertñ.
Compose keys are most popular onLinux and other systems using theX Window System, but software exists to implement them onWindows andmacOS.
The Compose Character key[2][3] was introduced by engineers atDigital Equipment Corporation (DEC) on theLK201 keyboard, available since 1983 with theVT220 terminal.[4] The keyboard included an LED indicating that a Compose sequence is on-going.[5] While the LK201 introduced the group of command keys between the alphanumerical block and the numerical keypad, and the "inverted T" arrangement of arrow keys, which have become standard,[6] the compose key by contrast did not become a standard.
In 1987,Sun Microsystems released theSun4, the first dedicated Unix workstation that had a compose key.[4] On the keyboards of Sun Type 5 and 6 workstations, the Compose LED is placed in the keycap (see picture below).
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 inUnicode asU+2384 ⎄COMPOSITION SYMBOL.
BecauseMicrosoft Windows andmacOS 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-handWindows key, theAltGr key, or one of theCtrl keys.[7] There is no keyboard LED or other physical indicator that a compose sequence is ongoing, though the OS may show some icon (such as the "Compose Character" symbol, below) on the user's text input field.
If the Compose key is not also amodifier key, thenkey rollover means the compose key does not have to be released before the subsequent keystrokes. This makes it possible for experienced typists to enter composed characters rapidly.
Earlier versions of compose sequences followed handwriting and theoverstrike technique by putting the letter first and diacritics second. For exampleComposen~ produced the characterñ. This order is still in use,[8] however the inverse order known from accent-markdead keys present on the lasttypewriters is used today:Compose~n forñ.[9] This allows multiple diacritics, for instance typingCompose'^a forấ.
Non-accented characters are generally constructed from letters that when overtyped or sequenced would produce something like the character. For instanceComposeoc will produce thecopyright symbol ©, andComposeAE will produceÆ.
There is no intrinsic limit on sequence length, which should respect both the rules ofmnemonics andergonomics, andfeasibility within a comprehensive compose tree. For example,U+278C ➌DINGBAT NEGATIVE CIRCLED SANS-SERIF DIGIT THREE might be inserted byCompose@%$3, where@ indicates circled characters,[10]% indicates inverse,$ indicates sans-serif, and3 indicates the final character.

The primary advantage of a compose key is that the sequence used to select the character can be made up of any letters, numbers, or symbols available on the keyboard. This allows the sequence to be moremnemonic, so it is easier to remember, possible to guess at if unknown, and can support far greater numbers of characters.
The primary disadvantage is that compose sequences always require at least one more keystroke. Inconvenient placement of the compose key can also slow typing.
The most common method used to enter characters not printed on the keys is amodifier key such asAltGr. This method suffers from the limitation that AltGr adds just two more (shifted and unshifted) associations for each key. The additional characters made available are typically customized to the local market and thus meet the needs of most users, most of the time. The default UK/Ireland layout, for example, provides (via AltGr+aeiou) the letters á é í ó ú that are needed forIrish Gaelic but consequently not the letters à è ì ò ù needed forScottish Gaelic.
Adead key treats the first character in any sequence as a modifier for the next key[s]: when pressed, the key appears to have no effect until the next key is pressed. (Most systems try to make the choice of dead key a logical part of the character selection; this makes sense foraccent marks and the concept is extended to other symbols). For example, thegrave ("backtick") key (`) is often a dead key: to achieveà, the sequence`+a is used. Compound sequences are possible: for example to add atwo dots (diacritic), the" seems an obvious candidate but clearly this heavily used key cannot be repurposed as a dead key. The solution is to modify it using AltGr, thusAltGr+2 a deliversä.[a] Other combinations are rather less obvious than their compose-key counterparts: for example compareCompose+,+s withAltGr+= s forş (ChromeOS with UK extended mapping).
Alt codes orUnicode numerical input could almost be considered a compose key, but use unintuitive numbers, instead of mnemonics, as the selector.
Modern GUI character choosers often require a search function that is not much different than the compose sequences to locate a character quickly.
X header files call the Compose Key the "Multi_key". OnXorg the default Compose Key is⇧ Shift+AltGr,[11] (while pressingAltGrbefore⇧ Shift is the "fourth keyboard level modifier", a different key). OnGentoo Linux the Compose Key is disabled by default.[12] As this is rather inconvenient (especially for keyboards without anAltGr), it is common to select a keyboard layout where another key such as the right-handCtrl or⊞Win is mapped to the compose key. This option is normally available in the settings of the desktop environment. The X keyboard driver does not allow the key used for Compose to also function as a modifier.[citation needed] On modern systems a vast number of compose sequences are supported.[13]
On Microsoft Windows, a few programs such asPuTTY provide compose-key support.[citation needed] To emulate the compose key for all software, keyboard shortcut utilities are often involved. There are also a number ofopen-sourceutilities (such as WinCompose,[14] AllChars,[15] Compose-Keys,[16] or Compose[17]). Installable keyboard layouts (such as KbdEdit[18]) are available that contain a compose key assigned to one of the keys likeCtrl orAltGr. They work by using thedead-key chaining feature that is more commonly used to input letters with multiple diacritics. Such keyboard layouts can also be programmed directly in C (the language Windows drivers are written in), compiled using the free-of-charge Windows Driver Kit,[19] and packaged using the free-of-charge Microsoft Keyboard Layout Creator 1.4,[20] compatible up to the latest versions of the OS.
Although theCocoa text input system allows entry of many alternate and accented characters natively in macOS,[21] a true compose-key solution is not built in. At least one has been implemented using the Karabiner utility,[8] which works with all applications, as does the use of certain keyboard layouts (e.g. "ABC – Extended") where Compose is implemented using the dead key chaining feature.[21]
AlthoughChromeOS issupplied with a larger repertoire of glyphs than most competitors, the chords needed to achieve them are not always as obvious as the Compose concept provides. Google has made available an add-on (ComposeKey) to compete in this market.[22][23]
Under DOS, compose key support depended on the running application, or on a loadable keyboard driver. For example,Lotus 1-2-3 usedAlt+F1 as compose key to allow easier input of many special characters of theLotus International Character Set (LICS)[24] andLotus Multi-Byte Character Set (LMBCS).
The table shown below shows some of the default compositions for theX.Org server. For modern systems which support Unicode, the table below is far from complete.[13]
|
|
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||