spiegel-keyman/web/docs/engine/reference/interface/deadkeyOutput.md
Marc Durdin 1f82507730 docs(web): deprecate unused and obsolete API endpoints and docs cleanup
Deprecate the following obsolete functions and properties:
* `keyman.helpURL`
* `keyman.util.rgba`
* `keyman.util.toFloat`
* `keyman.util.toNumber`
* `keyman.util.toNzString`

Use correct language for code blocks in Keyman Engine for Web
documentation.

Test-bot: skip
2026-08-12 16:07:22 +02:00

1.4 KiB

title
deadkeyOutput (KDO)

Summary

Deadkey output: Associates the deadkey state dk with the element at the current caret position, after overwriting nd characters.

Syntax

keyman.interface.deadkeyOutput(nd, Pelem, dk);

or

KeymanWeb.KDO(nd, Pelem, dk); // Shorthand

Parameters

nd
Type: number
The number of characters to overwrite (delete). May be set to -1 or 0 to prevent overwrites.
Pelem
Type: Element
The element receiving output.
dk
Type: number
The deadkey id.

Return Value

undefined

Description

Deadkeys are useful for tracking hidden state information used to modify future keystrokes. For example, rather than using

"`" + "a" = "à"

to combine two visible characters, certain applications may desire to keep the "`" character hidden with a rule such as

+ '`' > dk(backquote)

...

dk(backquote) + "a" > "à"

The Developer compiler then generates a unique id for the deadkey state - say, 0, and upon detecting input of the '`' character with the keyman.interface.deadkeyMatch() function, compiles the deadkey generation to

keyman.interface.deadkeyOutput(0, Pelem, 0);

See also