Skip to content

Modern Tui TuiInput Feed

Paul Squires edited this page Oct 19, 2026 · 6 revisions

Home › Terminal TUI Library › Events › TuiInput.Feed

TuiInput.Feed

Adds raw bytes from the terminal; an unfinished sequence is kept for later.

Syntax

TuiInput.Feed( byref bytes as string )

Description

Appends raw bytes. A sequence may arrive split across two reads; the parser keeps what it cannot yet decide about.

Example

#import "std/tui"
using tui

dim as TuiInput keys
keys.Feed( chr( 27 ) )            '' half of a sequence
print keys.NextEvent( ).HasValue( )        '' false -- it waits
keys.Feed( "[B" )                 '' the rest
print keys.NextEvent( ).Value( ).key.code = TUIKEY_DOWN '' -1 (true)

See also

TuiEvent TuiKey.IsChar TuiMouse TuiInput TuiInput.PushEvent TuiInput.Buffered
TuiKey TuiKey.HasMod TuiKeyName TuiInput.NextEvent TuiInput.Reset TuiInput.Queued

Library: Terminal TUI Library
Category: Terminal TUI Library
Documented under: Events
Working examples: hello.tiko · form.tiko · dashboard.tiko


Home · Keyword Index

Clone this wiki locally