Updated Edit
On this page
Terminal class for raw-mode input handling and screen management.
#claudewheel.terminal
#claudewheel.terminal
Raw terminal I/O: cbreak mode, escape sequence decoding, and alt screen.
#Terminal
Low-level terminal I/O: raw mode, key reading, alt screen, and size detection.
#get_size
python
def get_size(self) -> tuple[int, int]#enter_raw
python
def enter_raw(self) -> None#exit_raw
python
def exit_raw(self) -> None#read_key
python
def read_key(self) -> strRead a single keypress, decoding escape sequences for arrow keys etc.
#_write_tty
python
def _write_tty(self, text: str) -> NoneWrite directly to the TTY device.
#write
python
def write(self, text: str) -> None#flush
python
def flush(self) -> None#close
python
def close(self) -> NoneClose the /dev/tty file handle.