Package-level declarations

Types

Link copied to clipboard
class AnsiTerminal(val colorMode: ColorMode = ColorMode.detect()) : Terminal

An implementation of Terminal that uses ANSI escape sequences.

Link copied to clipboard
enum ColorMode : Enum<ColorMode>

Supported color modes for terminal rendering.

Link copied to clipboard
sealed class Event

Base class for all terminal events.

Link copied to clipboard

A state-machine-based parser for terminal input bytes.

Link copied to clipboard
sealed class Key

Represents a key on the keyboard.

Link copied to clipboard
data class KeyEvent(val key: Key, val modifiers: Set<KeyModifier> = emptySet()) : Event

Represents a keyboard input event.

Link copied to clipboard
enum KeyModifier : Enum<KeyModifier>

Keyboard modifier keys.

Link copied to clipboard
interface Terminal

The high-level interface for terminal interaction.

Functions

Link copied to clipboard
inline fun <T> Terminal.useRawMode(block: (Terminal) -> T): T

Safely enters raw mode, executes the block, and ensures raw mode is exited even if an exception occurs.