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
@type decoded() :: {:key, Ghostty.KeyEvent.t()} | {:data, binary()}