class

CRT::Ansi::Input

Inherits Reference < Object

Constructors

new(io : IO)
Source

Instance methods

poll_event

Return the next event if input is available, nil otherwise. Never blocks — suitable for frame-rate-based loops.

Source
read_event

Read the next input event (blocking). Returns Key or Mouse.

Source
read_key

Read the next key event (blocking). Discards mouse events.

Source