keymap

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultKeyMap = NewBase()

DefaultKeyMap is the default keymap instance for the Grove ecosystem

Functions

This section is empty.

Types

type Base

type Base struct {
	// Navigation - vim style takes precedence
	Up       key.Binding
	Down     key.Binding
	Left     key.Binding
	Right    key.Binding
	PageUp   key.Binding
	PageDown key.Binding
	Home     key.Binding
	End      key.Binding

	// Core actions
	Quit    key.Binding
	Help    key.Binding
	Confirm key.Binding
	Cancel  key.Binding
	Back    key.Binding

	// Search
	Search      key.Binding
	SearchNext  key.Binding
	SearchPrev  key.Binding
	ClearSearch key.Binding

	// View management
	SwitchView key.Binding
	NextTab    key.Binding
	PrevTab    key.Binding
	FocusNext  key.Binding
	FocusPrev  key.Binding

	// Selection
	Select       key.Binding
	SelectAll    key.Binding
	SelectNone   key.Binding
	ToggleSelect key.Binding
}

Base contains the standard keybindings used across all Grove TUIs Prioritizes vim-style navigation and standard actions

func NewBase

func NewBase() Base

NewBase creates a new Base keymap with default Grove keybindings

func (Base) FullHelp

func (k Base) FullHelp() [][]key.Binding

FullHelp returns a slice of all key bindings for the full help view

func (Base) ShortHelp

func (k Base) ShortHelp() []key.Binding

ShortHelp returns a slice of key bindings for the short help view

type FormKeyMap

type FormKeyMap struct {
	Base
	NextField key.Binding
	PrevField key.Binding
	Submit    key.Binding
	Reset     key.Binding
}

FormKeyMap extends Base with form-specific bindings

func NewFormKeyMap

func NewFormKeyMap() FormKeyMap

NewFormKeyMap creates a new form-specific keymap

type ListKeyMap

type ListKeyMap struct {
	Base
	Edit   key.Binding
	Delete key.Binding
	Copy   key.Binding
	Paste  key.Binding
}

ListKeyMap extends Base with list-specific bindings

func NewListKeyMap

func NewListKeyMap() ListKeyMap

NewListKeyMap creates a new list-specific keymap

type TreeKeyMap

type TreeKeyMap struct {
	Base
	Expand   key.Binding
	Collapse key.Binding
	Toggle   key.Binding
}

TreeKeyMap extends Base with tree-specific bindings

func NewTreeKeyMap

func NewTreeKeyMap() TreeKeyMap

NewTreeKeyMap creates a new tree-specific keymap

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL