|This article needs additional citations for verification. (March 2015)|
A dead key is a special kind of a modifier key on a mechanical typewriter, or computer keyboard, that is typically used to attach a specific diacritic to a base letter. The dead key does not generate a (complete) character by itself, but modifies the character generated by the key struck immediately after. Thus, a dedicated key is not needed for each possible combination of a diacritic and a letter, but rather only one dead key for each diacritic is needed, in addition to the normal base letter keys.
For example, if a keyboard has a dead key for the grave accent (`), the French character à can be generated by first pressing ` and then A, whereas è can be generated by first pressing ` and then E.
Usually, the diacritic in an isolated form can be generated with the dead key followed by space, so a plain grave accent can be typed by pressing ` and then Space. This legacy behavior is newly replaced with a more efficient one with respect to the use of combining diacritics following the Unicode Standard. The combining diacritic is then obtained with Space, while a spacing form of the diacritic is inserted with No-Break Space (typically ⇧ Shift+Space or AltGr+Space).
A dead key is different from a typical modifier key (such as AltGr or ⌥ Option) in that, rather than being pressed and held while another key is struck, the dead key is pressed and released before striking the key to be modified. In some computer systems, there is no indication to the user that a dead key has been struck, so the key appears dead, but in some text-entry systems the diacritic is displayed along with an indication that the system is waiting for another keystroke to complete the typing sequence.
On a typewriter, the character modifier functionality is accomplished mechanically by striking the diacritical mark without advancing the carriage (in modern terms, that diacritical mark keys are non-spacing). Thus, the following letter will strike the same spot on the paper. By construction, this has no restrictions on a typewriter, so one could place an acute accent (
´) on a q, for example.
Computers do not, however, work this way. On a computer, the dead key temporarily changes the mapping of the keyboard for the next keystroke, so it activates a special keyboard mode rather than generates a modifier character. Instead of the normal letter, a precomposed variant of it with the appropriate diacritic is generated. Each combination of a diacritic and a base letter must be specified in the character set and supported by the font in use. As there is no precomposed character to combine the acute accent with the letter q, striking ´ and then q is likely to result in ´q, with the accent and letter as separate characters, or in some systems the invalid typing sequence may be discarded. (Using the combining characters available in the Unicode character set, it may be possible to generate a combination that more or less looks like a q with an acute accent – q́ – but this is a technique quite distinct from the dead key functionality.)
Chained dead keys
Unicode encoded over one hundred precomposed characters with two diacritics, for use in Latin script for Vietnamese and a number of other languages. For convenience, they are generated on most keyboards supporting them, by pressing the two corresponding deadkeys in any order, followed by the letter key. Therefore, these dead keys are chained, which means that the second keystroke does not trigger any insertion, the system being still awaiting another key press.
This chained dead key behavior is toggled by the dead key flag, which is the fourth argument of the DEADTRANS function (after the base character code, the diacritic code, and the composed character code). If this flag is set to its default value zero, the composed character is inserted; if it is set to one, the composed character code is handled as another diacritic code like those due to dead key presses, and occurs typically as a second argument in other deadlist entries.
Chaining dead keys allows to implement a compose key emulation by simply using the dead key feature. This may be performed either with proprietary keyboard editing software, or with driver development kits.
Dead keys on various keyboard layouts
A key may function as a dead key by default, and many non-English keyboard layouts in particular have dead keys directly on the keyboard. The basic US keyboard does not have any dead keys, but the US-International keyboard layout, available on Windows and the X Window System, places some dead keys directly on similar-looking punctuation marks. Old computer systems, such as the MSX, often had a special key labeled dead key, which in combination with the Ctrl and Shift keys could be used to add some of the diacritics commonly needed in the Western European languages (
¨) to vowels that were typed subsequently.
In the absence of a default dead key, even a normal printing key can temporarily be altered to function as a dead key by simultaneously holding down another modifier key (typically AltGr or Option). In Microsoft Word, using the Control key with a key that usually resembles the diacritic (e.g.
^ for a circumflex) acts as a dead key.
On the Macintosh, many keyboard layouts employ dead keys. In the U.S. layout, the following selection of dead keys appears:
- ⌥ Option+e → á, é, í, ó, ú
- ⌥ Option+` → à, è, ì, ò, ù
- ⌥ Option+u → ä, ë, ï, ö, ü, ÿ
- ⌥ Option+i → â, ê, î, ô, û
- ⌥ Option+n → ã, õ, ñ
For example, when ⌥ Option+E are first pressed simultaneously and then followed by A, the result is á. On a Macintosh, pressing one of these Option-key combinations creates the accent and highlights it, then the final character appears when the key for the base character is pressed. However, some diacritically-marked Latin letters less common in the Western European languages, such as ŵ (used in Welsh) or š (used in many Eastern European languages), cannot be typed with the U.S. layout, which predates Unicode and only provides access to characters found in the legacy Mac Roman character set. Access to many more diacritics is provided by the U.S. Extended keyboard layout.
In AmigaOS, dead keys are generated by pressing Alt in combination with F (acute), G (grave), H (circumflex), J (tilde) or K (trema) (e.g., the
ALT-F combination followed by the
a key generates á and
ALT-F followed by
e generates é, whereas
ALT-G followed by
a generates à and
ALT-G followed by
e generates è).
Unicode kills dead keys
||This section's tone or style may not reflect the encyclopedic tone used on Wikipedia. (November 2015)|
The access to dead key functionality is dependable of the Operating System (Unix, CPM, Dos, Apple, Windows, Linux, Android, etc.), and the used keyboard. Check the system settings to the correct keyboard, correct locale settings, charactercodetable and correct activated key-layout. By default the Linux(-kernel) activates dead key functionality as typewriter-method with UTF-8 (-ASCII-) encoding. The diacritic-signs themselves need twice typing (double keystroke).
Unfortunately, with the introduction of the european Extended ASCII ISO 8859-15 (Latin9) codingtable, several diacritic and quotation signs are recoded outside the keyboard's scope. Even in case the OS keyboard-hardware-settings allows dead key functionality, the third party Unicode-decoder ignores these keystrokes (because they are ASCII-codes). Whether the Unicode-encoder is active or not, might be OS-dependable, can be application dependable, and can even be file dependable.
Unicode is surely active if diacritic or quotation are visible (printed) as question marks (older textfile UTF-recovered). Today diacritic characters often has to been retrieved, by application-build-in mouse fishing in a virtual character pond. (Editing a formula in a Math-editor drives one insane!)
On a US-QWERTY-keyboard, generic with dead key, codetable ISO8859-15 Latin9, and active Unicode-encoder, diacritics and quotation signs can even be not available at all. Change the application settings (text editor) if possible, from the european ISO 8859-15 encodingtable to the global english ISO 8859-1 (Latin1).
Often, -not always!-, the righthand Alt-key (-AltGraph-) has to be used as a special key (-compose key-). Press AltGr down, keep it down, and use the diacritic ([Shift]) -toets ~ ` ^ ¨ or ´ . Release the AltGr. With this method you may often place the diacritic and quotation signs themselves. Else you can try by stroke the signs twice. Diacritic dead key compositions (of a ` and e to è ), is within Unicode not possible.
Unicode is a third party international 16 bits character-encodingtable. It might become active after an OS- or application-update. OS-developers aren't responsible for unicode (Or the mismatch it´s create; the ASCII-keyboard and Keyboard-encoder works fine). Application-developers has to figure it out and comes up with a great variety of solutions. User John Doe does not know a thing, -finds himself stuck with a 'broken' keyboard with non-functional dead keys-, and ask himself; ¨What have I done wrong?!¨ By the way, Unicode may also produce printing output-errors; on screen correct, on paper printed wrong. Use the 'print as pdf.' instead.
- The Unicode Standard, version 8.0.0, ch.05, §12 Strategies for Handling Nonspacing Marks: Keyboard Input | http://www.unicode.org/versions/Unicode8.0.0/ch05.pdf#G1076
- Commodore-Amiga, Inc. AMIGA ROM Kernel Reference Manual LIBRARIES. Addison-Wesley. pp. 823–827. ISBN 0-201-56774-1.