Documentation ¶
Overview ¶
Package ui contains types that may be used by different editor frontends.
Index ¶
Constants ¶
View Source
const ( F1 rune = -iota - 1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Up Down Right Left Home Insert Delete End PageUp PageDown DefaultBindingRune // A special value to represent default binding. Tab = '\t' Enter = '\n' Backspace = 0x7f )
Special negative runes to represent function keys, used in the Rune field of the Key struct.
Variables ¶
View Source
var Default = Key{DefaultBindingRune, 0}
Default is used in the key binding table to indicate default binding.
View Source
var ErrKeyMustBeString = errors.New("key must be string")
Functions ¶
func TranslateStyle ¶
Types ¶
type Key ¶
Key represents a single keyboard input, typically assembled from a escape sequence.
type Mod ¶
type Mod byte
Mod represents a modifier key.
const ( // Shift is the shift modifier. It is only applied to special keys (e.g. // Shift-F1). For instance 'A' and '@' which are typically entered with the // shift key pressed, are not considered to be shift-modified. Shift Mod = 1 << iota // Alt is the alt modifier, traditionally known as the meta modifier. Alt Ctrl )
Values for Mod.
Click to show internal directories.
Click to hide internal directories.