isComposingIgnoreKey

Commons
stable

Returns true when a keyboard event is fired during IME composition (isComposing) AND the key is one of the keys that should be swallowed during composition (Enter, etc.). Used by text inputs to avoid premature confirmation while the user is still typing CJK characters.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

e
requis
KeyboardEvent
The keyboard event. Both e.isComposing and e.key are inspected.

API

Valeur de retour

La valeur retournée par cet util.

true when e.isComposing is true and e.key is in COMPOSITION_IGNORE_KEYS; false otherwise.

Usage

Exemples

Extraits de code prêts à coller.

Guard Enter during IME composition

typescript