LavaUI docs GitHub

struct KeyEvent

Swift

struct KeyEvent

A key transition, decoded from the raw engine event.

Sources/LavaUI/Focus.swift:130

Constructors

init(key: Int32, mods: Int32, isRepeat: Bool = false)

Creates a key event.

Sources/LavaUI/Focus.swift:139

Properties

var alt: Bool { get }

Whether Alt was held.

Sources/LavaUI/Focus.swift:150

var control: Bool { get }

Whether Control was held.

Sources/LavaUI/Focus.swift:148

let isRepeat: Bool

Whether this is an auto-repeat of a held key rather than a fresh press.

Sources/LavaUI/Focus.swift:136

let key: Int32

The GLFW key code (GLFW_KEY_*).

Sources/LavaUI/Focus.swift:132

let mods: Int32

Modifier bits held with the key; see KeyMods.

Sources/LavaUI/Focus.swift:134

var shift: Bool { get }

Whether Shift was held.

Sources/LavaUI/Focus.swift:146

var superKey: Bool { get }

Whether Super (the Windows or Command key) was held.

Sources/LavaUI/Focus.swift:152