key

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultMap = Map{
	Search: key.NewBinding(
		key.WithKeys("tab"),
		key.WithHelp("tab", "search")),
	DiscardSearch: key.NewBinding(
		key.WithKeys("shift+tab"),
		key.WithHelp("shift+tab", "all cmds")),
	Quit: key.NewBinding(
		key.WithKeys("esc"),
		key.WithHelp("esc", "quit")),
	ForceQuit: key.NewBinding(
		key.WithKeys("ctrl+c"),
		key.WithHelp("ctrl+c", "force exit")),
	Enter: key.NewBinding(
		key.WithKeys("enter"),
		key.WithHelp("enter", "compose")),
	Back: key.NewBinding(
		key.WithKeys("esc"),
		key.WithHelp("esc", "back")),
	New: key.NewBinding(
		key.WithKeys("n"),
		key.WithHelp("n", "new")),
	Edit: key.NewBinding(
		key.WithKeys("e"),
		key.WithHelp("e", "edit")),
	Explain: key.NewBinding(
		key.WithKeys("x"),
		key.WithHelp("x", "explain")),
	Copy: key.NewBinding(
		key.WithKeys("c"),
		key.WithHelp("c", "copy")),
	Delete: key.NewBinding(
		key.WithKeys("backspace"),
		key.WithHelp("backspace", "delete")),
	NextParamKey: key.NewBinding(
		key.WithKeys("tab"),
		key.WithHelp("tab", "next param"),
	),
	PreviousParamKey: key.NewBinding(
		key.WithKeys("shift+tab"),
		key.WithHelp("shift+tab", "previous param"),
	),
}

DefaultMap of key bindings.

Functions

This section is empty.

Types

type Map

type Map struct {
	Search           key.Binding
	DiscardSearch    key.Binding
	Quit             key.Binding
	ForceQuit        key.Binding
	Enter            key.Binding
	Back             key.Binding
	New              key.Binding
	Edit             key.Binding
	Explain          key.Binding
	Copy             key.Binding
	NextParamKey     key.Binding
	PreviousParamKey key.Binding
	Delete           key.Binding
}

Map of key bindings.

func (Map) FullHelp

func (km Map) FullHelp() [][]key.Binding

func (Map) ShortHelp

func (km Map) ShortHelp() []key.Binding

Jump to

Keyboard shortcuts

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