Skip to content

InputParser

[Source]

Stateful parser that converts raw terminal bytes into InputEvent values. Handles UTF-8, CSI sequences, SS3 sequences, and control characters.

class ref InputParser

Constructors

create

[Source]

new iso create()
: InputParser iso^

Returns


Public Functions

parse

[Source]

Parse raw bytes into input events. If the data ends mid-escape-sequence, the parser retains state for the next call. A standalone ESC byte at the end of data is emitted as an Escape key event.

fun ref parse(
  data: Array[U8 val] val)
: Array[(KeyEvent val | MouseEvent val | ResizeEvent val)] val

Parameters

Returns