spiegel-keyman/web/docs/engine/reference/core/isChiral.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.2 KiB

title
isChiral

Summary

Test if a given keyboard recognizes chiral modifier data, such as left-control vs right-control.

Syntax

keyman.isChiral(keyboard);

Parameters

keyboard
Type: string optional
The id (identifying name) of a keyboard. Defaults to the currently-active keyboard if not specified.

Return Value

boolean
true if the keyboard accepts chiral (left-vs-right) variants of CTRL and ALT, false if not.

Description

The specified keyboard must have been fully loaded at some point for this information to be accessible; otherwise it will return false (non-chiral). It is always accurate for the currently-active keyboard.

With the present system architecture, this is a bit complicated in that a keyboard is only set to 'active' after the keyboardloaded event completes and after the keyboardchange event has completed for the first activation of a keyboard. However, both events return the name of the keyboard involved in the event, and this can be passed as an argument to isChiral from the keyboardloaded event's handler to obtain the correct keyboard chirality information.