TerminalKeyEvent

data class TerminalKeyEvent(val key: TerminalKey? = null, val codepoint: Int = NO_CODEPOINT, val unshiftedCodepoint: Int = NO_CODEPOINT, val shiftedCodepoint: Int = NO_CODEPOINT, val baseLayoutCodepoint: Int = NO_CODEPOINT, val associatedText: String? = null, val modifiers: Int = TerminalModifiers.NONE, val type: TerminalKeyEventType = TerminalKeyEventType.PRESS)

One keyboard event accepted by the terminal input encoder.

Exactly one of key or codepoint must be provided. Non-printable keys use key; printable text uses a Unicode scalar codepoint.

Constructors

Link copied to clipboard
constructor(key: TerminalKey? = null, codepoint: Int = NO_CODEPOINT, unshiftedCodepoint: Int = NO_CODEPOINT, shiftedCodepoint: Int = NO_CODEPOINT, baseLayoutCodepoint: Int = NO_CODEPOINT, associatedText: String? = null, modifiers: Int = TerminalModifiers.NONE, type: TerminalKeyEventType = TerminalKeyEventType.PRESS)

Types

Link copied to clipboard
object Companion

Factory methods and sentinel values for TerminalKeyEvent.

Properties

Link copied to clipboard

host-owned text produced by this key for Kitty associated-text reporting, or null when unknown or inapplicable.

Link copied to clipboard

standard PC-101 base-layout key scalar for Kitty alternate-key reporting, or NO_CODEPOINT when unknown.

Link copied to clipboard

Unicode scalar value for printable input, or NO_CODEPOINT when this is a non-printable key.

Link copied to clipboard

non-printable key, or null when this is printable input.

Link copied to clipboard

active keyboard modifiers using TerminalModifiers bits.

Link copied to clipboard

shifted current-layout key scalar for Kitty alternate-key reporting, or NO_CODEPOINT when unknown.

Link copied to clipboard

physical lifecycle phase as reported by the host adapter.

Link copied to clipboard

unshifted Unicode scalar identifying the physical text-producing key for Kitty-compatible protocols, or NO_CODEPOINT when the input source cannot provide that identity. This may differ from codepoint, such as a for a Shift+A event that produces A.