onOutput property

void Function(String title)? onOutput
getter/setter pair

Function that is called when the terminal emits data to the underlying program. This is typically caused by user inputs from textInput, keyInput, mouseInput, or paste.

Bytes from libghostty-vt (keys and mouse reports typed into a TerminalView, replies to the program's queries) are decoded as UTF-8, or as Latin-1 for a chunk that is not valid UTF-8 (X10 mouse reports). onOutputBytes has the exact bytes.

Implementation

void Function(String data)? onOutput;