$ rezi
Protocol

Event Batches (ZREV)

The engine emits input as a ZREV event batch — a binary format containing one or more input events.

The engine emits input as a ZREV event batch — a binary format containing one or more input events.

Event Types

ZREV batches contain these event record types:

RecordDescription
KeyKeyboard input with key code and modifiers
MouseMouse events (move, press, release, drag, scroll) with position and button state
ResizeTerminal size change
TickAnimation timer

Mouse Event Records

Mouse records include:

  • x, y — cursor position in terminal cells
  • mouseKind — event type: move (1), press (2), release (3), drag (4), scroll (5)
  • mods — modifier keys held (shift, ctrl, alt, meta)
  • buttons — button state bitmask
  • wheelX, wheelY — scroll deltas

Parsing

Rezi parses ZREV deterministically:

  • no reads past buffer end
  • no unbounded allocations from untrusted sizes
  • explicit, structured errors (no exceptions)

See:

On this page