tui

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultKeyMap = KeyMapTyp{
	Switch: key.NewBinding(
		key.WithKeys("tab"),
		key.WithHelp("tab", "switch focus"),
	),
	Backward: key.NewBinding(
		key.WithKeys("esc", "backspace"),
		key.WithHelp("esc/backspace", "go back"),
	),
	Enter: key.NewBinding(
		key.WithKeys("enter"),
		key.WithHelp("enter", "explore"),
	),
	Exit: key.NewBinding(
		key.WithKeys("q", "ctrl+c"),
		key.WithHelp("q/ctrl+c", "exit"),
	),
}

Functions

func RunTUI

func RunTUI(result *result.Result)

Types

type DynamicKeyMap

type DynamicKeyMap struct {
	Short []key.Binding
	Long  [][]key.Binding
}

func (DynamicKeyMap) FullHelp

func (d DynamicKeyMap) FullHelp() [][]key.Binding

func (DynamicKeyMap) ShortHelp

func (d DynamicKeyMap) ShortHelp() []key.Binding

type KeyMapTyp

type KeyMapTyp struct {
	Switch   key.Binding
	Backward key.Binding
	Enter    key.Binding
	Exit     key.Binding
}

Jump to

Keyboard shortcuts

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