Logo FS-Skia-UI

ViewerKeyboard Module

Public contract module exposed by this FS.Skia.UI package.

Functions and values

Function or value Description

noModifiers

Full Usage: noModifiers

Returns: KeyModifiers

Feature 108 (US5, FR-016): the all-false `KeyModifiers` — an unmodified key's modifier set.

Returns: KeyModifiers

normalize raw

Full Usage: normalize raw

Parameters:
    raw : string

Returns: ViewerKey

Public contract function exposed by this FS.Skia.UI package.

raw : string
Returns: ViewerKey

normalizeEvent event

Full Usage: normalizeEvent event

Parameters:
Returns: ViewerKey * bool

Public contract function exposed by this FS.Skia.UI package.

event : ViewerKeyEvent
Returns: ViewerKey * bool

normalizeEventWithModifiers event

Full Usage: normalizeEventWithModifiers event

Parameters:
Returns: ViewerKey * bool * KeyModifiers

Feature 108 (US5, FR-016): strip the leading `Ctrl+`/`Alt+`/`Shift+`/`Meta+` prefixes (case-insensitive, any order, repeats tolerated) off the raw key, then `normalize` the base key. Returns the base `ViewerKey`, the down/up flag (as `normalizeEvent`), and the held `KeyModifiers`. An unmodified key yields `noModifiers` and the SAME `ViewerKey` as `normalizeEvent` (byte-identical routing); a chord recovers every held modifier — zero silent loss (SC-009). Pure, total; never throws.

event : ViewerKeyEvent
Returns: ViewerKey * bool * KeyModifiers

toKeyId key

Full Usage: toKeyId key

Parameters:
Returns: KeyId

Public contract function exposed by this FS.Skia.UI package.

key : ViewerKey
Returns: KeyId

Type something to start searching.