keybindings

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2026 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Matches

func Matches(msg tea.KeyMsg, binding key.Binding) bool

Matches checks if a key message matches a binding

Types

type KeyGroup

type KeyGroup struct {
	Name     string
	Bindings []key.Binding
}

KeyGroup represents a category of keybindings for help display

type KeyMap

type KeyMap struct {
	// Global
	Quit        key.Binding
	ShowHelp    key.Binding
	CyclePanel  key.Binding
	EscapePanel key.Binding

	// Sidebar
	LoadRequest   key.Binding
	DeleteRequest key.Binding
	NavUp         key.Binding
	NavDown       key.Binding

	// Request Pane
	SendRequest      key.Binding // Both Alt+Enter AND Cmd+Enter
	SaveRequest      key.Binding
	ToggleLoadTest   key.Binding
	NextField        key.Binding
	PrevField        key.Binding
	ChangeMethodNext key.Binding
	ChangeMethodPrev key.Binding

	// Response Pane
	CopyResponse key.Binding
	TabNavNext   key.Binding
	TabNavPrev   key.Binding
	DirectTab    key.Binding // 1,2,3
	ScrollUp     key.Binding
	ScrollDown   key.Binding

	// Help Modal
	CloseHelp key.Binding
	NextTab   key.Binding
	PrevTab   key.Binding
}

KeyMap holds all application keybindings

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns the default keybinding configuration

func (KeyMap) GetKeyGroups

func (km KeyMap) GetKeyGroups() []KeyGroup

GetKeyGroups returns keybindings organized by context for help display

Jump to

Keyboard shortcuts

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