etui/input
Types
Events decoded from a chunk, plus the bytes that did not form a complete
sequence. remainder is always either empty or starts with ESC.
pub type Parsed {
Parsed(events: List(backend.InputEvent), remainder: String)
}
Constructors
-
Parsed(events: List(backend.InputEvent), remainder: String)
Values
pub fn flush(remainder: String) -> List(backend.InputEvent)
Turn a leftover remainder into events once it is clear no more input is coming (the read timed out).
A remainder always starts with ESC. If that is all it is, the user pressed Escape. A genuinely truncated sequence also yields Escape; its trailing bytes are dropped rather than delivered as stray key presses, because a half escape sequence is not text the user typed.