class

Tui::InputParser

Inherits Reference / Object

Constants

BURST_CHAR_INTERVAL = 8.milliseconds
BURST_ENTER_SUPPRESS = 120.milliseconds
BURST_MIN_CHARS = 3
BYTE_0 = '0'.ord.to_u8

Byte constants for parsing

BYTE_9 = '9'.ord.to_u8
BYTE_BRACKET = '['.ord.to_u8
BYTE_ESC = 27_u8
BYTE_LESS_THAN = '<'.ord.to_u8
BYTE_LOWER_M = 'm'.ord.to_u8
BYTE_SEMICOLON = ';'.ord.to_u8
BYTE_TILDE = '~'.ord.to_u8
BYTE_UPPER_A = 'A'.ord.to_u8
BYTE_UPPER_B = 'B'.ord.to_u8
BYTE_UPPER_C = 'C'.ord.to_u8
BYTE_UPPER_D = 'D'.ord.to_u8
BYTE_UPPER_F = 'F'.ord.to_u8
BYTE_UPPER_H = 'H'.ord.to_u8
BYTE_UPPER_M = 'M'.ord.to_u8
BYTE_UPPER_O = 'O'.ord.to_u8
BYTE_UPPER_P = 'P'.ord.to_u8
BYTE_UPPER_Q = 'Q'.ord.to_u8
BYTE_UPPER_R = 'R'.ord.to_u8
BYTE_UPPER_S = 'S'.ord.to_u8
PASTE_END = [BYTE_ESC, BYTE_BRACKET, '2'.ord.to_u8, '0'.ord.to_u8, '1'.ord.to_u8, BYTE_TILDE]

Constructors

new(input_provider : InputProvider = StdinInputProvider.new)
Source

Instance methods

events

Get event channel for select

Source
flush_paste_burst

Flush pending paste burst data if due (non-bracketed paste heuristic)

Source
has_pending_burst?

Check if there's pending burst data that might need flushing

Source
input_provider

Get/set the input provider (for testing)

Source
input_provider=(input_provider : InputProvider)

Get/set the input provider (for testing)

Source
read_event(timeout : Time::Span) : Event | Nil

Read event with timeout

Source
read_event

Read next event (blocking) - waits for event

Source
start

Start the input reading fiber

Source
stop

Stop the input reading fiber

Source