bindings

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binder

type Binder interface {
	Bind(k string) *SequenceTree
}

type Func

type Func func(tea.KeyMsg) tea.Cmd
var NilFunc Func = func(msg tea.KeyMsg) tea.Cmd {
	return nil
}

func (Func) Call

func (fn Func) Call(msg tea.KeyMsg) tea.Cmd

type Map

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

func NewMap

func NewMap() *Map

func (*Map) Bind

func (m *Map) Bind(k string) *SequenceTree

func (*Map) Debug

func (m *Map) Debug()

func (*Map) Exec

func (m *Map) Exec(msg tea.KeyMsg) Func

func (*Map) Matches

func (m *Map) Matches(msg tea.KeyMsg) bool

type Node

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

func (*Node) Action

func (node *Node) Action(act Func) *Node

func (*Node) Option

func (node *Node) Option(k string) *Node

type Options

type Options map[string]*Node

type SequenceTree

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

func (*SequenceTree) Action

func (seq *SequenceTree) Action(act Func) *Node

func (*SequenceTree) OnESC

func (seq *SequenceTree) OnESC(fn Func) *SequenceTree

func (*SequenceTree) Option

func (seq *SequenceTree) Option(k string) *Node

Jump to

Keyboard shortcuts

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