Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AllKnownKeys = []string{}/* 124 elements not displayed */
AllKnownKeys is a comprehensive list of all known keyboard combinations
var InputHandlerKeys = []string{
"space", "tab", "enter", "alt+enter", "shift+enter", "backspace", "delete",
"up", "down", "left", "right", "home", "end",
"ctrl+a", "ctrl+e", "ctrl+u", "ctrl+k", "ctrl+w", "ctrl+l",
"ctrl+z", "ctrl+y",
}
InputHandlerKeys are keys that can be handled by text input components
Functions ¶
func CanInputHandle ¶
CanInputHandle checks if a key can be handled by input components
func IsKeyOrPrintable ¶
IsKeyOrPrintable checks if a key is either a known key or a printable character
func IsKnownKey ¶
IsKnownKey checks if a key string represents a known keyboard key combination or a single printable character
func IsPrintableCharacter ¶
IsPrintableCharacter checks if a key string represents a single printable character
func PrintableText ¶ added in v0.118.0
PrintableText returns the literal characters represented by a key press, or "" if the key has no printable text (Enter, Backspace, arrow keys, modifier combos, etc.). In Bubble Tea v2 the printable text lives in KeyPressMsg.Text; KeyMsg.String() returns the human-readable key *name* ("space", "ctrl+c"), which is what keybinding lookups want but is not what should be inserted into a text buffer. Use this helper when you need the literal input.
Types ¶
This section is empty.