loom & weft
Made for Swift.

Unreleased APIs from PR #2. Not in 0.2.1. Stable 0.2.1 reference.

LOOM Unreleased (PR #2) / TERMINAL ALIASES FROM WEFT

KeyEventKind

The phase reported by an extended keyboard protocol. Legacy key events are normalized as .press.

loom.KeyEventKind is an alias for weft.KeyEventKind. It is available through import loom. The underlying type’s members are documented here.

Standard inherited Swift protocol operations such as synthesized equality and OptionSet set operations are not repeated. The public declarations below are extracted from the exact source revision listed in the coverage manifest.

Example

let phase: KeyEventKind = .press
_ = KeyEvent(key: .newline, kind: phase)
Members on this page

Feature guides and release status

KeyEventKind

Type Alias
typealias KeyEventKind = weft.weft.KeyEventKind

The phase reported by an extended keyboard protocol. Legacy key events are normalized as .press.

Source · TerminalExports.swift:15

Underlying weft API

KeyEventKind

Enumeration
enum KeyEventKind

Conforms to: Swift.Equatable, Swift.Hashable, Swift.Sendable, Swift.SendableMetatype.

Whether the key was pressed, repeated, or released.

Source · KeyEvent.swift:20

press

Case
case press

The press case. Associated values, if any, are shown in the declaration.

Source · KeyEvent.swift:21

repeated

Case
case repeated

The repeated case. Associated values, if any, are shown in the declaration.

Source · KeyEvent.swift:22

release

Case
case release

The release case. Associated values, if any, are shown in the declaration.

Source · KeyEvent.swift:23