R
fn

isTypedCharValid

testeddemo

Returns `true` when the event represents a single printable character typed without a command/control/alt modifier. Uses `KeyboardEvent.key` (a single Unicode grapheme for printable keys) instead of the deprecated `keyCode`, so it transparently covers digits, latin letters and any other printable glyph.

Demo

Loading demo…

Signature

ts
export function isTypedCharValid(event: KeyboardEvent): boolean{ ... }

Parameters

ParameterTypeDescription
eventKeyboardEvent

Returns

boolean