shortcutdialog

package
v0.0.0-...-52a80d5 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventToString

func EventToString(event *tcell.EventKey) string

EventToString renders a tcell.EventKey as a human readable string

func RunShortcutsDialogStandalone

func RunShortcutsDialogStandalone()

func ShowShortcutsDialog

func ShowShortcutsDialog(app *tview.Application, onClose func())

Types

type ShortcutTable

type ShortcutTable struct {
	// contains filtered or unexported fields
}

ShortcutTable is a component that displays shortcuts and allows changing them.

func NewShortcutTable

func NewShortcutTable() *ShortcutTable

NewShortcutTable creates a new shortcut table that doesn't contain any data.

func (*ShortcutTable) GetPrimitive

func (shortcutTable *ShortcutTable) GetPrimitive() tview.Primitive

GetPrimitive returns the primitive to be put onto a layout.

func (*ShortcutTable) GetShortcuts

func (shortcutTable *ShortcutTable) GetShortcuts() []*shortcuts.Shortcut

GetShortcuts returns the array containing the currently displayed shortcuts.

func (*ShortcutTable) IsDefiningShortcut

func (shortcutTable *ShortcutTable) IsDefiningShortcut() bool

IsDefiningShortcut indicates whether the user is currently selecting a shortcut for any function.

func (*ShortcutTable) SetFocusNext

func (shortcutTable *ShortcutTable) SetFocusNext(function func())

SetFocusNext decides which component will be focused when hitting tab

func (*ShortcutTable) SetFocusPrevious

func (shortcutTable *ShortcutTable) SetFocusPrevious(function func())

SetFocusPrevious decides which component will be focused when hitting shift+tab

func (*ShortcutTable) SetShortcuts

func (shortcutTable *ShortcutTable) SetShortcuts(shortcuts []*shortcuts.Shortcut)

SetShortcuts sets the shortcut data and changes the UI accordingly.

Jump to

Keyboard shortcuts

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