Skip to content

Modern Tui TuiInput PushEvent

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

Home › Terminal TUI Library › Events › TuiInput.PushEvent

TuiInput.PushEvent

Adds an event to the back of the queue, to inject input yourself.

Syntax

TuiInput.PushEvent( byval e as TuiEvent )

Description

Puts an event at the back of the queue. For synthesising input -- a replayed macro, a test, or a key your own code decided to inject.

Example

#import "std/numeric"
#import "std/tui"
using tui, numeric

dim as TuiInput keys
dim as TuiEvent e
e.kind = TUIEVENT_KEY : e.key.code = TUIKEY_ENTER
keys.PushEvent( e )
print keys.Queued( )                       '' 1
print keys.NextEvent( ).Value( ).key.code = TUIKEY_ENTER '' -1 (true)

See also

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