Compose key explained

A compose key (sometimes called multi key) is a key on a computer keyboard that indicates that the following (usually 2 or more) keystrokes trigger the insertion of an alternate character, typically a precomposed character or a symbol.[1]

For instance, typing followed by and then will insert ñ.

Compose keys are most popular on Linux and other systems using the X Window System, but software exists to implement them on Windows and macOS.

History

The Compose Character key[2] [3] was introduced by engineers at Digital Equipment Corporation (DEC) on the LK201 keyboard, available since 1983 with the VT220 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 the Sun4, the first dedicated Unix workstation that had a compose key. 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 in Unicode as .

Because Microsoft Windows and macOS 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 key, or one of the 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.

Compose sequences

If the Compose key is not also a modifier key, then key 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 the overstrike technique by putting the letter first and diacritics second. For example produced the character ñ. This order is still in use,[8] however the inverse order known from accent-mark dead keys present on the last typewriters is used today: for ñ.[9] This allows multiple diacritics, for instance typing for .

Non-accented characters are generally constructed from letters that when overtyped or sequenced would produce something like the character. For instance will produce the copyright symbol ©, and will produce Æ.

There is no intrinsic limit on sequence length, which should respect both the rules of mnemonics and ergonomics, and feasibility within a comprehensive compose tree. For example, might be inserted by, where indicates circled characters,[10] indicates inverse, indicates sans-serif, and indicates the final character.

Compared to other input methods

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 more mnemonic, 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 a modifier key such as AltGr. 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 for Irish Gaelic but consequently not the letters à è ì ò ù needed for Scottish Gaelic.

A dead 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 for accent marks and the concept is extended to other symbols). For example, the grave ("backtick") key is often a dead key: to achieve, the sequence is used. Compound sequences are possible: for example to add a two 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, thus delivers . Other combinations are rather less obvious than their compose-key counterparts: for example compare with for (ChromeOS with UK extended mapping).

Alt codes or Unicode 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.

Software support

X Window System

X header files call the Compose Key the "Multi_key". On Xorg the default Compose Key is +,[11] (while pressing before is the "fourth keyboard level modifier", a different key). On Gentoo Linux the Compose Key is disabled by default.[12] As this is rather inconvenient (especially for keyboards without an), it is common to select a keyboard layout where another key such as the right-hand or 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. On modern systems a vast number of compose sequences are supported.[13]

Windows

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,[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 like or . 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 (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.

macOS

Although the Cocoa 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, 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.

ChromeOS

Although ChromeOS is supplied 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]

DOS

Under DOS, compose key support depended on the running application, or on a loadable keyboard driver. For example, Lotus 1-2-3 used as compose key to allow easier input of many special characters of the Lotus International Character Set (LICS)[24] and Lotus Multi-Byte Character Set (LMBCS).

Common compose combinations

The table shown below shows some of the default compositions for the X.Org server. For modern systems which support Unicode, the table below is far from complete.

typefor
á
ä
à
ã
â
ǎ
å
ā
ą
ă
ȧ
Above work for
most uppercase and
lowercase vowels.
typefor
æ
Æ
œ
Œ
ð
Ð
°
¤
©
®
§
ß
þ
Þ
×
·
typefor
«
»
\
ø
Ø
¿
ç
Ç
¡
÷
đ
Đ
typefor
£
¹
²
³
ª
º
ñ
š
¢
¥
½
¼
¾

External links

Notes and References

  1. Web site: Linux Keyboard Text Symbols: Compose-Key Shortcuts . FSymbols . 2013-07-24 . 2015-07-07.
  2. Web site: p1060628 . WickensOnline . 2007 . 2015-07-07 . https://web.archive.org/web/20150413081423/http://www.wickensonline.co.uk/public-gallery/LK201/p1060628.html . 2015-04-13 . dead .
  3. Web site: LK201_large_keycodes.jpg . JPEG . The NetBSD Project . 2015-07-09.
  4. Web site: Add a Virtual Compose Key to Your PC . Windows.Appstorm . 2015-07-07 . 2020-11-06 . https://web.archive.org/web/20201106074437/http://windows.appstorm.net/roundups/utilities-roundups/add-a-virtual-compose-key-to-your-pc/ . dead .
  5. Web site: p1060631 . WickensOnline . 2007 . 2015-07-07 . https://web.archive.org/web/20150413081428/http://www.wickensonline.co.uk/public-gallery/LK201/p1060631.html . 2015-04-13 . dead .
  6. Web site: Inverse-T History . Burrows . Jim . 2009-09-21 . Nerd Corner . 2015-07-09.
  7. Web site: Compose Key on Windows. Earthwithsun.com. https://web.archive.org/web/20160303172349/http://earthwithsun.com/questions/64178/compose-key-on-windows. 2016-03-03. 2015-07-07.
  8. Web site: Setting up a Real Compose Key on Mac OS X . Lol Engine . 2012-06-18 . 2015-07-07 . 2020-06-22 . https://web.archive.org/web/20200622230501/http://lolengine.net/blog/2012/06/17/compose-key-on-os-x . dead .
  9. Web site: Enter european accented characters on an american keyboard . ZoneO Software . June 2006 . 2015-07-07 . https://web.archive.org/web/20150418003212/http://soft.zoneo.net/Linux/compose_key.php . 2015-04-18 . dead .
  10. is suggested for circled characters, rather than, so that can yield, while yields .
  11. Web site: Compose Key. Ubuntu. 2012-07-10.
  12. Web site: Compose key - Gentoo wiki . 2024-04-27 . wiki.gentoo.org.
  13. Web site: UTF-8 (Unicode) compose sequence . Monniaux . David . 2015-07-15.
  14. https://github.com/SamHocevar/wincompose Compose Key for Windows
  15. http://sourceforge.net/projects/allchars/ AllChars
  16. https://github.com/MrBertie/compose-keys Compose Keys
  17. https://github.com/p3lim/Compose Compose
  18. http://www.kbdedit.com/manual/ex17_compose_key_chained_dead.html KbdEdit – Emulating Compose key using chained dead keys
  19. https://www.microsoft.com/en-us/download/details.aspx?id=11800 Windows Driver Kit Version 7.1.0
  20. https://www.microsoft.com/en-us/download/details.aspx?id=102134 Microsoft Keyboard Layout Creator 1.4
  21. Web site: U.S. custom Keyboard Layout . Wust . J. 'Mach' . SourceForge . 2015-06-29 . 2015-07-07.
  22. Web site: extra-keyboards-for-chrome-os/composekey/ . github.com . 28 January 2020.
  23. Web site: ComposeKey. Chrome Store . 28 January 2020.
  24. Book: HP 95LX User's Guide . Hewlett-Packard Company, Corvallis Division . Corvallis, OR, USA . 2 . Appendix F . June 1991 . March 1991 . F0001-90003 . 2016-11-27 . live . https://web.archive.org/web/20161128202642/http://www.retroisle.com/others/hp95lx/OriginalDocs/95LX_UsersGuide_F1000-90001_826pages_Jun91.pdf . 2016-11-28.