Expand description

Implements dead key handling.

Dead key is a character composition approach where an accented character, typically from a Western European alphabet, is composed by actuating two keys on the keyboard:

  1. A “dead key” which determines which diacritic is to be placed on the character, and which produces no immediate output; and
  2. The character onto which the diacritic is to be placed.

The resulting two successive key actuations produce an effect of single accented character being emitted.

The dead key handler relies on keymap already having been applied, and the use of key meanings.

This means that the dead key handler must be added to the input pipeline after the keymap handler in the input pipeline.

The dead key handler can delay or modify the key meanings, but it never delays nor modifies key events. This ensures that clients which require key events see the key events as they come in. The key meanings may be delayed because of the delayed effect of composition.

The state machine of the dead key handler is watching for dead key and “live” key combinations, and handles all their possible interleaving. The event sequences vary from the “obvious” ones such as “dead key press and release followed by a live key press and release”, to not so obvious ones such as: “dead key press and hold, shift press, live key press and hold followed by another live key press, followed by arbitrary sequence of key releases”.

See the documentation for [Handler] for some more detail.

Structs§