Skip to main content

Module tty

Module tty 

Source
Expand description

Cleanroom Rust port of upstream Go source file: tty.go Upstream Target Tag / Version: v2.0.8

# TTY Terminal Management

TTY initialization, input stream setup, raw mode toggles, and window dimension queries for Bubble Tea v2.0.8.

Functionsยง

disable_raw_mode
Restores the terminal state saved by enable_raw_mode, mirroring the upstream term.Restore path.
enable_raw_mode
Initializes terminal raw mode, mirroring the upstream initInput -> term.MakeRaw path (tty_unix.go). Unlike a fully-zeroed cfmakeraw, only OPOST is cleared from the output flags, so TABDLY (and thus the hard-tab cursor optimization) behaves exactly as it does upstream.
get_window_size
Queries current window size columns and rows.
init_terminal
Initializes terminal raw mode.
restore_terminal
Restores terminal raw mode.