Versions in this module Expand all Collapse all v1 v1.0.1 Jul 24, 2026 v1.0.0 Jul 23, 2026 Changes in this version + const KeyBackspace + const KeyBegin + const KeyCapsLock + const KeyDelete + const KeyDown + const KeyEnd + const KeyEnter + const KeyEsc + const KeyEscape + const KeyExtended + const KeyF1 + const KeyF10 + const KeyF11 + const KeyF12 + const KeyF13 + const KeyF14 + const KeyF15 + const KeyF16 + const KeyF17 + const KeyF18 + const KeyF19 + const KeyF2 + const KeyF20 + const KeyF21 + const KeyF22 + const KeyF23 + const KeyF24 + const KeyF25 + const KeyF26 + const KeyF27 + const KeyF28 + const KeyF29 + const KeyF3 + const KeyF30 + const KeyF31 + const KeyF32 + const KeyF33 + const KeyF34 + const KeyF35 + const KeyF36 + const KeyF37 + const KeyF38 + const KeyF39 + const KeyF4 + const KeyF40 + const KeyF41 + const KeyF42 + const KeyF43 + const KeyF44 + const KeyF45 + const KeyF46 + const KeyF47 + const KeyF48 + const KeyF49 + const KeyF5 + const KeyF50 + const KeyF51 + const KeyF52 + const KeyF53 + const KeyF54 + const KeyF55 + const KeyF56 + const KeyF57 + const KeyF58 + const KeyF59 + const KeyF6 + const KeyF60 + const KeyF61 + const KeyF62 + const KeyF63 + const KeyF7 + const KeyF8 + const KeyF9 + const KeyFind + const KeyHome + const KeyInsert + const KeyIsoLevel3Shift + const KeyIsoLevel5Shift + const KeyKp0 + const KeyKp1 + const KeyKp2 + const KeyKp3 + const KeyKp4 + const KeyKp5 + const KeyKp6 + const KeyKp7 + const KeyKp8 + const KeyKp9 + const KeyKpBegin + const KeyKpComma + const KeyKpDecimal + const KeyKpDelete + const KeyKpDivide + const KeyKpDown + const KeyKpEnd + const KeyKpEnter + const KeyKpEqual + const KeyKpHome + const KeyKpInsert + const KeyKpLeft + const KeyKpMinus + const KeyKpMultiply + const KeyKpPgDown + const KeyKpPgUp + const KeyKpPlus + const KeyKpRight + const KeyKpSep + const KeyKpUp + const KeyLeft + const KeyLeftAlt + const KeyLeftCtrl + const KeyLeftHyper + const KeyLeftMeta + const KeyLeftShift + const KeyLeftSuper + const KeyLowerVol + const KeyMediaFastForward + const KeyMediaNext + const KeyMediaPause + const KeyMediaPlay + const KeyMediaPlayPause + const KeyMediaPrev + const KeyMediaRecord + const KeyMediaReverse + const KeyMediaRewind + const KeyMediaStop + const KeyMenu + const KeyMute + const KeyNumLock + const KeyPause + const KeyPgDown + const KeyPgUp + const KeyPrintScreen + const KeyRaiseVol + const KeyReturn + const KeyRight + const KeyRightAlt + const KeyRightCtrl + const KeyRightHyper + const KeyRightMeta + const KeyRightShift + const KeyRightSuper + const KeyScrollLock + const KeySelect + const KeySpace + const KeyTab + const KeyUp + const ModAlt + const ModCapsLock + const ModCtrl + const ModHyper + const ModMeta + const ModNumLock + const ModScrollLock + const ModShift + const ModSuper + const MouseBackward + const MouseButton10 + const MouseButton11 + const MouseForward + const MouseLeft + const MouseMiddle + const MouseNone + const MouseRight + const MouseWheelDown + const MouseWheelLeft + const MouseWheelRight + const MouseWheelUp + var ErrInterrupted = errors.New("program was interrupted") + var ErrProgramKilled = errors.New("program was killed") + var ErrProgramPanic = errors.New("program experienced a panic") + func LogToFile(path string, prefix string) (*os.File, error) + func LogToFileWith(path string, prefix string, log LogOptionsSetter) (*os.File, error) + func OpenTTY() (*os.File, *os.File, error) + type BackgroundColorMsg struct + func (e BackgroundColorMsg) IsDark() bool + func (e BackgroundColorMsg) String() string + type BatchMsg []Cmd + type BlurMsg struct + type CapabilityMsg struct + Content string + func (c CapabilityMsg) String() string + type ClipboardMsg struct + Content string + Selection byte + func (e ClipboardMsg) Clipboard() byte + func (e ClipboardMsg) String() string + type Cmd func() Msg + func Batch(cmds ...Cmd) Cmd + func Every(duration time.Duration, fn func(time.Time) Msg) Cmd + func Exec(c ExecCommand, fn ExecCallback) Cmd + func ExecProcess(c *exec.Cmd, fn ExecCallback) Cmd + func Printf(template string, args ...any) Cmd + func Println(args ...any) Cmd + func Raw(r any) Cmd + func RequestCapability(s string) Cmd + func Sequence(cmds ...Cmd) Cmd + func SetClipboard(s string) Cmd + func SetPrimaryClipboard(s string) Cmd + func Tick(d time.Duration, fn func(time.Time) Msg) Cmd + type ColorProfileMsg struct + type Cursor struct + Blink bool + Color color.Color + Shape CursorShape + func NewCursor(x, y int) *Cursor + type CursorColorMsg struct + func (e CursorColorMsg) IsDark() bool + func (e CursorColorMsg) String() string + type CursorPositionMsg struct + X int + Y int + type CursorShape int + const CursorBar + const CursorBlock + const CursorUnderline + type EnvMsg uv.Environ + func (msg EnvMsg) Getenv(key string) (v string) + func (msg EnvMsg) LookupEnv(key string) (s string, v bool) + type ExecCallback func(error) Msg + type ExecCommand interface + Run func() error + SetStderr func(io.Writer) + SetStdin func(io.Reader) + SetStdout func(io.Writer) + type FocusMsg struct + type ForegroundColorMsg struct + func (e ForegroundColorMsg) IsDark() bool + func (e ForegroundColorMsg) String() string + type InterruptMsg struct + type Key struct + BaseCode rune + Code rune + IsRepeat bool + Mod KeyMod + ShiftedCode rune + Text string + func (k Key) Keystroke() string + func (k Key) String() string + type KeyMod = uv.KeyMod + type KeyMsg interface + Key func() Key + type KeyPressMsg Key + func (k KeyPressMsg) Key() Key + func (k KeyPressMsg) Keystroke() string + func (k KeyPressMsg) String() string + type KeyReleaseMsg Key + func (k KeyReleaseMsg) Key() Key + func (k KeyReleaseMsg) Keystroke() string + func (k KeyReleaseMsg) String() string + type KeyboardEnhancements struct + ReportAllKeysAsEscapeCodes bool + ReportAlternateKeys bool + ReportAssociatedText bool + ReportEventTypes bool + type KeyboardEnhancementsMsg struct + Flags int + func (k KeyboardEnhancementsMsg) SupportsAllKeysAsEscapeCodes() bool + func (k KeyboardEnhancementsMsg) SupportsAlternateKeys() bool + func (k KeyboardEnhancementsMsg) SupportsAssociatedText() bool + func (k KeyboardEnhancementsMsg) SupportsEventTypes() bool + func (k KeyboardEnhancementsMsg) SupportsKeyDisambiguation() bool + type LogOptionsSetter interface + SetOutput func(io.Writer) + SetPrefix func(string) + type ModeReportMsg struct + Mode ansi.Mode + Value ansi.ModeSetting + type Model interface + Init func() Cmd + Update func(Msg) (Model, Cmd) + View func() View + type Mouse struct + Button MouseButton + Mod KeyMod + X int + Y int + func (m Mouse) String() (s string) + type MouseButton = uv.MouseButton + type MouseClickMsg Mouse + func (e MouseClickMsg) Mouse() Mouse + func (e MouseClickMsg) String() string + type MouseMode int + const MouseModeAllMotion + const MouseModeCellMotion + const MouseModeNone + type MouseMotionMsg Mouse + func (e MouseMotionMsg) Mouse() Mouse + func (e MouseMotionMsg) String() string + type MouseMsg interface + Mouse func() Mouse + type MouseReleaseMsg Mouse + func (e MouseReleaseMsg) Mouse() Mouse + func (e MouseReleaseMsg) String() string + type MouseWheelMsg Mouse + func (e MouseWheelMsg) Mouse() Mouse + func (e MouseWheelMsg) String() string + type Msg = uv.Event + func ClearScreen() Msg + func Interrupt() Msg + func Quit() Msg + func ReadClipboard() Msg + func ReadPrimaryClipboard() Msg + func RequestBackgroundColor() Msg + func RequestCursorColor() Msg + func RequestCursorPosition() Msg + func RequestForegroundColor() Msg + func RequestTerminalVersion() Msg + func RequestWindowSize() Msg + func Suspend() Msg + type PasteEndMsg struct + type PasteMsg struct + Content string + func (p PasteMsg) String() string + type PasteStartMsg struct + type Position struct + X int + Y int + type Program struct + func NewProgram(model Model, opts ...ProgramOption) *Program + func (p *Program) Kill() + func (p *Program) Printf(template string, args ...any) + func (p *Program) Println(args ...any) + func (p *Program) Quit() + func (p *Program) ReleaseTerminal() error + func (p *Program) RestoreTerminal() error + func (p *Program) Run() (returnModel Model, returnErr error) + func (p *Program) Send(msg Msg) + func (p *Program) Wait() + type ProgramOption func(*Program) + func WithColorProfile(profile colorprofile.Profile) ProgramOption + func WithContext(ctx context.Context) ProgramOption + func WithEnvironment(env []string) ProgramOption + func WithFPS(fps int) ProgramOption + func WithFilter(filter func(Model, Msg) Msg) ProgramOption + func WithInput(input io.Reader) ProgramOption + func WithOutput(output io.Writer) ProgramOption + func WithWindowSize(width, height int) ProgramOption + func WithoutCatchPanics() ProgramOption + func WithoutRenderer() ProgramOption + func WithoutSignalHandler() ProgramOption + func WithoutSignals() ProgramOption + type ProgressBar struct + State ProgressBarState + Value int + func NewProgressBar(state ProgressBarState, value int) *ProgressBar + type ProgressBarState int + const ProgressBarDefault + const ProgressBarError + const ProgressBarIndeterminate + const ProgressBarNone + const ProgressBarWarning + func (s ProgressBarState) String() string + type QuitMsg struct + type RawMsg struct + Msg any + type ResumeMsg struct + type SuspendMsg struct + type TerminalVersionMsg struct + Name string + func (t TerminalVersionMsg) String() string + type View struct + AltScreen bool + BackgroundColor color.Color + Content string + Cursor *Cursor + DisableBracketedPasteMode bool + ForegroundColor color.Color + KeyboardEnhancements KeyboardEnhancements + MouseMode MouseMode + OnMouse func(msg MouseMsg) Cmd + ProgressBar *ProgressBar + ReportFocus bool + WindowTitle string + func NewView(s string) View + func (v *View) SetContent(s string) + type WindowSizeMsg struct + Height int + Width int