keymap

package
v0.0.0-...-73f9428 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Default = &KeyMap{
		Quit: key.NewBinding(
			key.WithKeys(tea.KeyCtrlQ.String()),
			key.WithHelp(tea.KeyCtrlQ.String(), "Quit"),
		),
		Send: key.NewBinding(
			key.WithKeys("Ctrl+Enter"),
			key.WithHelp("Ctrl+Enter", "Send request"),
		),
		NextPane: key.NewBinding(
			key.WithKeys(tea.KeyTab.String()),
			key.WithHelp(tea.KeyTab.String(), "Next Pane"),
		),
		PreviousPane: key.NewBinding(
			key.WithKeys(tea.KeyShiftTab.String()),
			key.WithHelp(tea.KeyShiftTab.String(), "Previous Pane"),
		),
	}
)

Functions

This section is empty.

Types

type KeyMap

type KeyMap struct {
	Quit key.Binding
	Send key.Binding
	// Delete key.Binding
	// Help         key.Binding
	NextPane     key.Binding
	PreviousPane key.Binding
}

KeyMap is a collection of key bindings for the application.

func (*KeyMap) FullHelp

func (k *KeyMap) FullHelp() [][]key.Binding

FullHelp returns an extended group of help items, grouped by columns. The help bubble will render the help in the order in which the help items are returned here.

func (*KeyMap) ShortHelp

func (k *KeyMap) ShortHelp() []key.Binding

ShortHelp returns a slice of bindings to be displayed in the short version of the help. The help bubble will render help in the order in which the help items are returned here.

Jump to

Keyboard shortcuts

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