menu

InputEventKey

import { InputEventKey } from "destack:input/binding";

Input key event.

language/library/src/input/binding/event.ds:144:171
1export struct InputEventKey {2    kind: "key";3    header: InputEventHeader;4    action: InputEventAction;5    key: string;6    code: string;7    location: KeyLocation;8    hostCode: uint32;9    hostScanCode: uint32;10    hostValue: int64;11    hostModifiers: uint32;12    modifiers: ModifierState;13    isRepeat: boolean;14    isComposing: boolean;15}

Members

kind: "key"

Event discriminator.

header: InputEventHeader

Shared event header.

action: InputEventAction

Event action.

key: string

Logical key value when available.

code: string

Physical key code when available.

location: KeyLocation

Key location.

hostCode: uint32

Host-native key code.

hostScanCode: uint32

Host-native scan code when available.

hostValue: int64

Host-native key value.

hostModifiers: uint32

Host-native modifier bitset.

modifiers: ModifierState

Canonical modifier state.

isRepeat: boolean

Whether the event is a repeat.

isComposing: boolean

Whether the key event belongs to composition.