Skip to content

Modern Tui TuiSuspend

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

Home › Terminal TUI Library › Application Loop › TuiSuspend

TuiSuspend

Returns a command that leaves the terminal, suspends the program, then comes back.

Syntax

TuiSuspend( ) as TuiCmd

Description

Leave the terminal, raise SIGTSTP, and come back with the screen invalidated. Ctrl+Z does NOT suspend in raw mode -- ISIG is cleared -- so an application that wants it must ask deliberately.

Example

#import "std/tui"
using tui

print TuiSuspend( ).kind = TUICMD_SUSPEND '' -1 (true)

'' in Update: bind it yourself, since the terminal will not
''     if( e.key.IsChar( ) andalso e.key.ch = 26 ) then return TuiSuspend( )

See also

TuiApp TuiApp.Update TuiApp.Shutdown TuiNone TuiQuit TuiInvalidate
TuiApp.Init TuiApp.View TuiCmd TuiRedraw TuiTick TuiRun

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


Home · Keyword Index

Clone this wiki locally