Skip to content

Modern Tui TuiInput Reset

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

Home › Terminal TUI Library › Events › TuiInput.Reset

TuiInput.Reset

Throws away the held bytes and the queued events.

Syntax

TuiInput.Reset( )

Description

Throws away both the byte buffer and the event queue. Use it after a suspend, when whatever was half-parsed is no longer meaningful.

Example

#import "std/tui"
using tui

dim as TuiInput keys
keys.Feed( chr( 27 ) & "[1;5" )   '' a partial sequence
keys.Reset( )
print keys.Buffered( ), keys.Queued( )     '' 0 0

See also

TuiEvent TuiKey.IsChar TuiMouse TuiInput TuiInput.NextEvent TuiInput.Buffered
TuiKey TuiKey.HasMod TuiKeyName TuiInput.Feed TuiInput.PushEvent 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