Versions in this module Expand all Collapse all v0 v0.4.0 Oct 21, 2026 Changes in this version + const Chunk + const DefaultMax + const DetectAfterDA1 + const DetectAfterReply + const DetectTimeout + const EBUDGET + const EDETACHED + const EINVAL + const ENOENT + const ENOTARGET + const EQUOTA + const EVERSION + const EventBlur + const EventCaps + const EventChange + const EventClick + const EventCommand + const EventDrag + const EventDragEnd + const EventDragStart + const EventFit + const EventFocus + const EventHover + const EventInput + const EventPress + const EventSubmit + const EventView + const FeatureCount + const FeatureHover + const FeatureMenu + const FeaturePassthrough + const MaxDepth + const MaxName + const MaxSize + const MenuDepth + const ModAlt + const ModCtrl + const ModShift + const ModSuper + const Number + const RevealEnd + const RevealNearest + const RevealStart + const TerminalKeys + const TouchMax + const Version + func Blur(surface string, opts ...ReplyOption) string + func CursorBelow(rows int) string + func DecodeKeys(input []byte) []string + func DefaultEdit(mod string) map[string][]string + func Del(surface string, opts ...ReplyOption) string + func DelAll(opts ...ReplyOption) string + func DelRes(id string, opts ...ReplyOption) string + func Delta(surface string, ops []Op, opts ...ReplyOption) string + func Detach(surface string, opts ...ReplyOption) string + func Doc(surface, html string, opts ...DocOption) string + func Edit(names []string, opts ...ReplyOption) string + func Encode(ctl Control, payload []byte) string + func EncodeEvent(e Event) string + func EncodePlain(ctl Control, payload []byte) string + func Err(r Reply) error + func Focus(surface, target string, opts ...ReplyOption) string + func Get(c Control, k string) string + func Has(c Control, k string) bool + func HasFeature(c Caps, feature string) bool + func Hide(surface string, opts ...ReplyOption) string + func KeyText(key string) (text string, ok bool) + func Light(c Caps) bool + func Lookup(c Control, k string) (string, bool) + func Menu(tree *MenuTree, opts ...ReplyOption) string + func MenuHide(opts ...ReplyOption) string + func MenuShow(seq []string, opts ...ReplyOption) string + func MenuShowOf(m Message) ([]string, error) + func MorphTo(surface, target, html string, opts ...ReplyOption) string + func ParseKey(name string) (canonical string, ok bool) + func Place(surface string, p Placement, opts ...ReplyOption) string + func PlaceAt(surface string, x, y int, p Placement, opts ...ReplyOption) string + func Query(n int, opts ...QueryOption) string + func RemoveAttr(surface, target, name string, opts ...ReplyOption) string + func ReplyCaps(n string, caps Caps) string + func ReplyDeltaErr(n, surface string, op int, code, detail string) string + func ReplyErr(n, surface, re, code, detail string) string + func ReplyOK(n, surface, re string, extra Control, body []byte) string + func ReplyQuery(query Control, caps Caps) string + func Res(id, mime string, data []byte, opts ...ReplyOption) string + func Reveal(surface, target, where string, opts ...ReplyOption) string + func Sanitize(v string) string + func SetAttr(surface, target, name, value string, opts ...ReplyOption) string + func SetText(surface, target, text string, opts ...ReplyOption) string + func SetVar(surface, target, name, value string, opts ...ReplyOption) string + func Speaks(query Control) bool + func SurfaceName(s string) string + func Sync(cmds ...string) string + func Touch(areas []TouchArea, opts ...ReplyOption) string + func ValidName(s string) bool + func WithdrawLate() string + type Action string + const CharBackward + const CharForward + const Copy + const Cut + const DeleteCharBackward + const DeleteCharForward + const DeleteToLineEnd + const DeleteToLineStart + const DeleteWordBackward + const DeleteWordForward + const InputEnd + const InputStart + const Insert + const LineEnd + const LineNext + const LinePrevious + const LineStart + const Newline + const PageDown + const PageUp + const Paste + const Prefix + const Program + const Redo + const ScrollDown + const ScrollEnd + const ScrollHalfPageDown + const ScrollHalfPageUp + const ScrollLeft + const ScrollPageDown + const ScrollPageUp + const ScrollRight + const ScrollStart + const ScrollUp + const SelectAll + const Submit + const Undo + const WordBackward + const WordForward + func (a Action) Moves() bool + func (a Action) Multiline() bool + func (a Action) Scrolls() bool + type Area struct + Col int + H int + Row int + W int + func (z *Area) DecodeMsg(dc *msgp.Reader) (err error) + func (z *Area) EncodeMsg(en *msgp.Writer) (err error) + func (z *Area) Msgsize() (s int) + type Axes int + const ScrollHorizontal + const ScrollVertical + type Caps struct + CellCSS Size + Edit map[string][]string + Features []string + Host string + Limits map[string]int + Mod string + Net map[string][]string + Raw []byte + Scale float64 + Scheme string + V string + Version string + func CapsOf(body []byte) (Caps, bool) + func Merge(c, changed Caps) Caps + func (z *Caps) DecodeMsg(dc *msgp.Reader) (err error) + func (z *Caps) EncodeMsg(en *msgp.Writer) (err error) + func (z *Caps) Msgsize() (s int) + type Command struct + HasText bool + Key string + Name string + Text string + type Control []KV + func With(c Control, k, v string) Control + func Without(c Control, keys ...string) Control + type Decoder struct + Invalid int + Max int + func (d *Decoder) Feed(seq string) (m Message, r Result) + type DetectState uint8 + const Detecting + const Native + const Text + func (s DetectState) String() string + type Detector struct + Caps Caps + Deadline time.Time + Decided bool + Done bool + Late bool + N int + State DetectState + func (d *Detector) DA1(now time.Time) bool + func (d *Detector) End(now time.Time) + func (d *Detector) Reply(r Reply, now time.Time) bool + func (d *Detector) Start(now time.Time) string + func (d *Detector) Tick(now time.Time) + type DocOption interface + func Detached() DocOption + func Scroll(axes Axes) DocOption + type Drag struct + Col int + HasTX bool + HasTY bool + HasX bool + HasY bool + Row int + TX int + TY int + X int + Y int + type Error struct + Code string + Detail string + HasOp bool + Op int + Re string + Surface string + func (e *Error) Error() string + type Event struct + Area *Area + Changed *Caps + Checked *bool + Command *Command + Count int + Detail []byte + Drag *Drag + Fields []FormField + FitRows int + Hover *Hover + Kind string + Link *Link + Mods int + Surface string + Target string + Value string + View *View + func EventOf(m Message) (Event, bool) + type Flag int + const Off + const On + type FormField struct + Name string + Value string + func (z *FormField) DecodeMsg(dc *msgp.Reader) (err error) + func (z FormField) EncodeMsg(en *msgp.Writer) (err error) + func (z FormField) Msgsize() (s int) + type Hover struct + Col int + Out bool + Row int + type KV struct + K string + V string + type Keymap struct + func ParseKeymap(p Platform, value string) *Keymap + func Resolve(p Platform, multiline bool, values ...string) *Keymap + func (m *Keymap) Bind(name string, a Action) bool + func (m *Keymap) Binds(name string) bool + func (m *Keymap) Format() string + func (m *Keymap) Lookup(name string) Action + func (m *Keymap) Prefix(name string) bool + func (m *Keymap) Program(name string) bool + func (m *Keymap) Scroll(name string) Action + func (m *Keymap) Selects(name string) bool + type Link struct + Href string + URL string + type MenuItem struct + Enabled bool + Items []MenuItem + Key string + Label string + Name string + func MenuFind(tree *MenuTree, name string) *MenuItem + func MenuLevelOf(tree *MenuTree, p Platform, seq []string) (items []MenuItem, ok bool) + func (z *MenuItem) DecodeMsg(dc *msgp.Reader) (err error) + func (z *MenuItem) EncodeMsg(en *msgp.Writer) (err error) + func (z *MenuItem) Msgsize() (s int) + type MenuKeys struct + Seq []string + func (z *MenuKeys) DecodeMsg(dc *msgp.Reader) (err error) + func (z *MenuKeys) EncodeMsg(en *msgp.Writer) (err error) + func (z *MenuKeys) Msgsize() (s int) + type MenuTree struct + Items []MenuItem + Label string + func MenuOf(m Message) (*MenuTree, error) + func (z *MenuTree) DecodeMsg(dc *msgp.Reader) (err error) + func (z *MenuTree) EncodeMsg(en *msgp.Writer) (err error) + func (z *MenuTree) Msgsize() (s int) + type Message struct + Control Control + Payload []byte + type Op struct + Key string + Op string + Target string + Value *string + func DeltaOf(m Message) ([]Op, error) + func OpAfter(target, html string) Op + func OpAppend(target, html string) Op + func OpAttr(target, name, value string) Op + func OpBefore(target, html string) Op + func OpInner(target, html string) Op + func OpMorph(target, html string) Op + func OpPrepend(target, html string) Op + func OpRemove(target string) Op + func OpReplace(target, html string) Op + func OpReveal(target, where string) Op + func OpText(target, text string) Op + func OpUnattr(target, name string) Op + func OpVar(target, name, value string) Op + func (z *Op) DecodeMsg(dc *msgp.Reader) (err error) + func (z *Op) EncodeMsg(en *msgp.Writer) (err error) + func (z *Op) Msgsize() (s int) + type Placement struct + Cols int + Fit Flag + Hover Flag + KeepCursor bool + Press Flag + Rows int + Window Window + Z int + func PlacementOf(m Message) (Placement, error) + type Platform struct + Edit map[string][]string + Mod string + func PlatformOf(c Caps) Platform + func (p Platform) ReadKey(name string) (canonical string, ok bool) + type QueryOption interface + func Late() QueryOption + type Quiet int + const NoReply + const ReplyAlways + const ReplyOnError + type Reply struct + Caps *Caps + Code string + Cols int + Detail string + HasOp bool + Message Message + N int + OK bool + Op int + Re string + Rows int + Surface string + func ReplyOf(m Message) (Reply, bool) + type ReplyOption struct + func N(n int) ReplyOption + func Q(q Quiet) ReplyOption + type Result int + const Complete + const Invalid + const NotHotty + const Partial + func (r Result) String() string + type Scanner struct + DA1 bool + Invalid int + func (s *Scanner) Feed(p []byte) []Segment + func (s *Scanner) Flush() []Segment + func (s *Scanner) Holding() []byte + func (s *Scanner) InSequence() bool + type Segment struct + Data []byte + Kind SegmentKind + type SegmentKind uint8 + const SegmentDA1 + const SegmentOSC + const SegmentPass + func (k SegmentKind) String() string + type Size struct + H float64 + W float64 + func (z *Size) DecodeMsg(dc *msgp.Reader) (err error) + func (z Size) EncodeMsg(en *msgp.Writer) (err error) + func (z Size) Msgsize() (s int) + type TouchArea struct + C int + Drag string + H int + R int + W int + func TouchOf(m Message) ([]TouchArea, error) + func (z *TouchArea) DecodeMsg(dc *msgp.Reader) (err error) + func (z *TouchArea) EncodeMsg(en *msgp.Writer) (err error) + func (z *TouchArea) Msgsize() (s int) + type View struct + Areas map[string]Area + AtEnd bool + type Window struct + H int + W int + X int + Y int