keymaps

package
v0.0.0-...-8595b8b Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultKeymap

type DefaultKeymap struct {
	Up     key.Binding
	Down   key.Binding
	Left   key.Binding
	Right  key.Binding
	Select key.Binding
	Help   key.Binding
	Quit   key.Binding
}

DefaultKeymap defines a set of keybindings. To work for help it must satisfy key.Map. It could also very easily be a map[string]key.Binding.

func Default

func Default() DefaultKeymap

func (DefaultKeymap) FullHelp

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

FullHelp returns keybindings for the expanded help view. It's part of the key.Map interface.

func (DefaultKeymap) ShortHelp

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

ShortHelp returns keybindings to be shown in the mini help view. It's part of the key.Map interface.

type InputKeymap

type InputKeymap struct {
	Left   key.Binding
	Tab    key.Binding
	Quit   key.Binding
	Select key.Binding
}

func Input

func Input() InputKeymap

func (InputKeymap) FullHelp

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

FullHelp returns keybindings for the expanded help view. It's part of the key.Map interface.

func (InputKeymap) ShortHelp

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

ShortHelp returns keybindings to be shown in the mini help view. It's part of the key.Map interface.

type ViewportKeymap

type ViewportKeymap struct {
	viewport.KeyMap
	Left key.Binding
	Help key.Binding
	Quit key.Binding
}

func Viewport

func Viewport() ViewportKeymap

func (ViewportKeymap) FullHelp

func (v ViewportKeymap) FullHelp() [][]key.Binding

FullHelp returns keybindings for the expanded help view. It's part of the key.Map interface.

func (ViewportKeymap) ShortHelp

func (v ViewportKeymap) ShortHelp() []key.Binding

ShortHelp returns keybindings to be shown in the mini help view. It's part of the key.Map interface.

Jump to

Keyboard shortcuts

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