InputParser

A state-machine-based parser for terminal input bytes.

Converts raw bytes from standard input into high-level Event objects. Handles multibyte ANSI escape sequences for special keys and modifiers.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val hasEvents: Boolean

Whether there are any bytes currently in the buffer that could form an event.

Functions

Link copied to clipboard
fun feed(bytes: ByteArray, count: Int)

Feeds raw bytes into the internal parser buffer.

Link copied to clipboard
fun next(): Event?

Attempts to parse the next event from the internal buffer.