Ghostty.KeyDecoder (Ghostty v0.4.0)

Copy Markdown View Source

Decodes terminal input bytes into Ghostty.KeyEvent values.

This decoder intentionally covers the portable baseline used by terminal apps: printable text, control keys, common CSI navigation keys, and Alt-modified printable keys. More advanced protocols can be added here without changing application runtimes.

Summary

Types

decoded()

@type decoded() :: {:key, Ghostty.KeyEvent.t()} | {:data, binary()}

Functions

decode(sequence)

@spec decode(binary()) :: decoded()