keybindings

package
v0.0.0-...-9d695bc Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultKeyMap = KeyMap{

	TtabSel: key.NewBinding(
		key.WithKeys("1", "2", "3", "4", "5", "6"),
		key.WithHelp("1-6", "GoTo Tab"),
	),
	Count: key.NewBinding(
		key.WithKeys("c"),
		key.WithHelp("c", "Show Counters"),
	),
	Stats: key.NewBinding(
		key.WithKeys("s"),
		key.WithHelp("s", "Show Statistics"),
	),
	Up: key.NewBinding(
		key.WithKeys("k", "up"),
		key.WithHelp("↑/k", "Move up"),
	),
	Down: key.NewBinding(
		key.WithKeys("j", "down"),
		key.WithHelp("↓/j", "Move down"),
	),
	PageUp: key.NewBinding(
		key.WithKeys("b", "pgup"),
		key.WithHelp("b/pgup", "Page Up"),
	),
	PageDown: key.NewBinding(
		key.WithKeys("f", "pgdown"),
		key.WithHelp("f/pgdn", "Page Down"),
	),
	Tab: key.NewBinding(
		key.WithKeys("tab"),
		key.WithHelp("tab", "Cycle tabs"),
	),
	Quit: key.NewBinding(
		key.WithKeys("q", "ctrl+c"),
		key.WithHelp("q", "Quit scom"),
	),
	Slash: key.NewBinding(
		key.WithKeys("/"),
		key.WithHelp("/", "Filter table"),
	),
	Info: key.NewBinding(
		key.WithKeys("i"),
		key.WithHelp("i", "Info"),
	),
	Enter: key.NewBinding(
		key.WithKeys("enter"),
		key.WithHelp("enter", "Select entry"),
	),
	SaveSubmitJob: key.NewBinding(
		key.WithKeys("ctrl+s"),
		key.WithHelp("ctrl+s", "Save and Submit the job script"),
		key.WithDisabled(),
	),
	Escape: key.NewBinding(
		key.WithKeys("Esc"),
		key.WithHelp("Esc", "Exit without saving"),
		key.WithDisabled(),
	),
}

TODO: add shift+tab

Functions

This section is empty.

Types

type KeyMap

type KeyMap struct {
	TtabSel       key.Binding
	Up            key.Binding
	Down          key.Binding
	Quit          key.Binding
	PageUp        key.Binding
	PageDown      key.Binding
	Tab           key.Binding
	Slash         key.Binding
	Info          key.Binding
	Enter         key.Binding
	SaveSubmitJob key.Binding
	Escape        key.Binding
	Stats         key.Binding
	Count         key.Binding
}

func (KeyMap) FullHelp

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

func (KeyMap) ShortHelp

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

Jump to

Keyboard shortcuts

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