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

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

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

API

Return value

The value returned by this util.

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

Usage

Examples

Ready-to-paste usage snippets.

Guard Enter during IME composition

typescript