Skip to content

Modern Tui TuiTermOptions

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

Home › Terminal TUI Library › Terminal › TuiTermOptions

TuiTermOptions

Holds which terminal features to take: alternate screen, raw keys, mouse and more.

Syntax

type TuiTermOptions
    as boolean altScreen, rawMode, hideCursor
    as boolean mouse, bracketedPaste, focusEvents
end type

Description

What to take from the terminal. Every field is off in a default-constructed value, and TuiTermOptionsDefault turns on the usual set -- but NOT the mouse and NOT focus events, which are opt-in. Whatever Enter switches on, Leave switches off.

Example

#import "std/tui"
using tui

dim as TuiTermOptions bare        '' everything FALSE
print len( TuiEnterSeq( bare ) )  '' 0 -- takes nothing, emits nothing

dim as TuiTermOptions o = TuiTermOptionsDefault( )
o.mouse = FALSE                   '' a keyboard-only application
print o.altScreen, o.rawMode      '' true true

See also

TuiTerminal TuiTerminal.IsActive TuiTerminal.DetectCaps TuiTerminal.Flush
TuiTerminal.Enter TuiTerminal.Size TuiTerminal.Write TuiTerminal.Discard
TuiTerminal.Leave TuiTerminal.Caps TuiTerminal.WriteText TuiTerminal.Pending

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


Home · Keyword Index

Clone this wiki locally