module

Smith::UI::KeyParser

Parses a byte stream into Keys. Split out from Terminal so specs can drive it with an IO::Memory.

Class methods

parse(io : IO) : Key | Nil

Reads one key from the given IO. Returns nil when the IO has no more data right now (timeout on a real terminal, EOF on a memory buffer) — the caller decides what that means.

Source