KeyboardProtocolMode enum

How much of the Kitty keyboard protocol a session negotiates (RFC 0020 §8).

Each tier is a request; what a terminal actually honours is confirmed by querying and reported through KeyboardCapabilities. Nothing here promises a capability — a terminal that ignores the push silently stays at whatever it already did.

Inheritance
Available extensions

Values

legacy → const KeyboardProtocolMode

Push nothing. Strict legacy behaviour, for debugging or a terminal known to mishandle the protocol.

const KeyboardProtocolMode(0)
disambiguated → const KeyboardProtocolMode

Flags 1|2 — disambiguate escape codes, and report event types.

The safe tier: what a lifecycle request falls back to when the terminal cannot honour full lifecycle transactionally, and what the automatic upgrade stops at inside a terminal multiplexer (tmux/screen), where a raw query is not a reliable statement about the host terminal. Flag 1 makes otherwise-ambiguous chords distinct (lone Esc, Ctrl+I vs Tab, Ctrl+M vs Enter, super/meta). Flag 2 adds press/repeat/release tags to keys that are ALREADY escape-coded — chords, arrows, function keys — which is what lets a binding fire once per physical press instead of once per auto-repeat.

Text is untouched: printable presses and repeats still arrive as ordinary bytes. Their RELEASES do become escape reports (the spec exempts only Enter, Tab and Backspace), which the parser drops and which §8.5's spawn bracket keeps out of child processes.

const KeyboardProtocolMode(1 | 2)
lifecycle → const KeyboardProtocolMode

Flags 1|2|4|8|16 — the full lifecycle: every key as an escape code, with alternate/base-layout identities and associated text.

The default request (RFC 0020 §26.1): runApp asks drivers for full lifecycle and capable drivers negotiate down transactionally, committing only when the terminal confirms 2, 8 AND 16 (§8.3) — flag 8 stops the terminal sending text, and flag 16 is what re-supplies it, so honouring one without the other would leave the session with no text input at all. FLEURY_KEYBOARD=disambiguated|legacy overrides the request for a terminal where the negotiation itself misbehaves.

const KeyboardProtocolMode(1 | 2 | 4 | 8 | 16)

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
requestedFlags → int
The progressive-enhancement bitset this tier pushes.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

values → const List<KeyboardProtocolMode>
A constant List of the values in this enum, in order of their declaration.