Skip to main content

Crate ftui_tty

Crate ftui_tty 

Source
Expand description

Native Unix terminal backend for FrankenTUI.

This crate implements the ftui-backend traits for native Unix/macOS terminals. It replaces Crossterm as the terminal I/O layer (Unix-first; Windows deferred).

§Escape Sequence Reference

FeatureEnableDisable
Alternate screenCSI ? 1049 hCSI ? 1049 l
Mouse (SGR)CSI ? 1000;1002;1006 h (+ split compatibility)CSI ? 1000;1002;1006 l (+ split compatibility)
Bracketed pasteCSI ? 2004 hCSI ? 2004 l
Focus eventsCSI ? 1004 hCSI ? 1004 l
Kitty keyboardCSI > 15 uCSI < u
Cursor show/hideCSI ? 25 hCSI ? 25 l
Sync outputCSI ? 2026 hCSI ? 2026 l

Structs§

RawModeGuard
RAII guard that saves the original termios and restores it on drop.
TtyBackend
Native Unix terminal backend.
TtyClock
Monotonic clock backed by std::time::Instant.
TtyEventSource
Native Unix event source (raw terminal bytes → Event).
TtyPresenter
Native ANSI presenter (Buffer → escape sequences → stdout).
TtySessionOptions
Configuration for opening a terminal session.

Functions§

write_cleanup_sequence
Write the full cleanup sequence for the given feature state to writer.
write_cleanup_sequence_with_sync_end
Write cleanup with an explicit DEC ?2026l prefix.