keyblock

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	Key     string
	Display string

	Number int

	Pressed bool
	// contains filtered or unexported fields
}

func NewKey

func NewKey(key string) *Key

func (*Key) Init

func (k *Key) Init() tea.Cmd

func (*Key) IsNumber

func (k *Key) IsNumber() bool

func (*Key) RemoveNumber

func (k *Key) RemoveNumber()

func (*Key) SetDisply

func (k *Key) SetDisply(display string)

func (*Key) SetNumber

func (k *Key) SetNumber(val int)

func (*Key) Update

func (k *Key) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Key) View

func (k *Key) View() string

type KeysLine

type KeysLine []*Key

func NewKeysLine

func NewKeysLine(keys ...string) KeysLine

func (KeysLine) Init

func (kl KeysLine) Init() tea.Cmd

func (KeysLine) SetDisplays

func (kl KeysLine) SetDisplays(displays ...string)

func (KeysLine) SetNumbers

func (kl KeysLine) SetNumbers(nums ...int)

func (KeysLine) Update

func (kl KeysLine) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (KeysLine) View

func (kl KeysLine) View() string

type PressMsg

type PressMsg = *Key

Jump to

Keyboard shortcuts

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