class

Tui::MockInputProvider

Inherits Tui::InputProvider / Reference / Object

Mock input for testing - reads from a queue

Constructors

new(blocking : Bool = false)
Source

Instance methods

empty?
Source
push_bytes(bytes : Array(UInt8)) : Nil

Add raw bytes to the queue

Source
push_bytes(*bytes : UInt8) : Nil
Source
push_char(char : Char, modifiers : Modifiers = Modifiers::None) : Nil

Add a character (with optional ctrl modifier)

Source
push_key(key : Key, modifiers : Modifiers = Modifiers::None) : Nil

Add escape sequence for a key

Source
push_mouse(x : Int32, y : Int32, button : MouseButton, action : MouseAction) : Nil

Add mouse event

Source
push_string(str : String) : Nil

Add a string (converted to bytes)

Source
read_byte
Source
size
Source
start
Source
stop
Source