Documentation
¶
Overview ¶
Package keys provides utilities for key(board) handling and configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsTextInputAction ¶ added in v0.22.1
IsTextInputAction checks if the key should be applied as text input.
func SetDefaultBind ¶
func ValidateBinds ¶
Types ¶
type Key ¶
type Key struct {
// Code is the key code identifier.
Code string `json:"code" jsonschema:"title=Code"`
// Alias is an alternative display name for the key.
Alias string `json:"alias,omitempty" jsonschema:"title=Alias"`
// Hidden determines if the key should be hidden from display.
Hidden bool `json:"hidden,omitempty" jsonschema:"title=Hidden"`
}
Key represents a keyboard key with optional alias and visibility settings.
type KeyBind ¶
type KeyBind struct {
// Description provides a description of what the key binding does.
Description string `json:"description" jsonschema:"title=Description"`
// Keys contains the list of keys that trigger this binding.
Keys []Key `json:"keys" jsonschema:"title=Keys"`
}
KeyBind represents a key binding with its description and associated keys.
func (*KeyBind) BubbleKey ¶ added in v0.25.0
func (kb *KeyBind) BubbleKey(opts ...bubblekey.BindingOpt) bubblekey.Binding
type KeyBindRenderer ¶
type KeyBindRenderer struct {
// contains filtered or unexported fields
}
func (*KeyBindRenderer) AddColumn ¶
func (kbr *KeyBindRenderer) AddColumn(kbs ...KeyBind)
func (*KeyBindRenderer) Render ¶
func (kbr *KeyBindRenderer) Render(width int) string
Click to show internal directories.
Click to hide internal directories.