nxt::input::Parser class

Incremental parser for terminal keyboard input bytes.

Public functions

auto feed(std::string_view bytes) →  std::vector<KeyEvent>
Feed bytes and return all complete decoded key events.
auto flush() →  std::vector<KeyEvent>
Flush pending bytes as best-effort events.
auto has_pending() const →  bool noexcept
True when the parser is waiting for more bytes.