Go bindings for libghostty-vt. pkg.go.dev/go.mitchellh.com/libghostty
ghostty

input: implement TextMarshaler/TextUnmarshaler for Key, Mods, MouseButton, FocusEvent master

Add human-friendly text serialization to the input enum types via the standard encoding.TextMarshaler and encoding.TextUnmarshaler interfaces. This makes them work transparently with encoding/json, TOML, YAML, XML, and flag.TextVar. Each type gains: - String() string returning the canonical snake_case name (e.g. "key_a", "arrow_down", "shift+ctrl", "middle", "gained"). - MarshalText() ([]byte, error) returning the same bytes as String. Mods(0) marshals to an empty byte slice. - UnmarshalText([]byte) error mutating the receiver. - A top-level ParseKey, ParseMods, ParseMouseButton, and ParseFocusEvent function as an ergonomic alternative to the pointer-receiver UnmarshalText. The Key and MouseButton names follow the upstream Zig source naming. Mods is rendered as a stable "+"-joined list of individual flag names; UnmarshalText accepts either "+" or "," as separators and supports the upstream aliases (cmd/command for super, opt/option for alt, control for ctrl).


Author Mitchell Hashimoto Date Commit f37f7177 Parent eb11e387 Change ID qxmtkxpm