module

TermBuf::Input

The input side of a terminal lives in the termbuf-input shard.

Everything under TermBuf::InputInput::Stream, Input::Decoder, Input::Key, Input::Events and the rest — is defined there, and this file is the require that brings it in plus the short spellings termbuf's own API is written in. Nothing in the input side depends on termbuf, which is what let it move: a program that only wants to read a keyboard can depend on termbuf-input alone.

TermBuf::Events::Resize is the one event that stayed behind, because it carries a ScreenSize. It is in terminal/event.cr and includes Input::Event so that it arrives on the same channel as everything else.