keybindings

package
v0.0.0-...-e70626f Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2021 License: GPL-3.0, GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Loader

func Loader(kb *Registry) lua.LGFunction

Types

type Callback

type Callback func() error

type KeyEvent

type KeyEvent struct {
	Key       rune
	Modifiers Modifiers
}

func (KeyEvent) String

func (s KeyEvent) String() string

type KeyEvents

type KeyEvents []KeyEvent

func (KeyEvents) String

func (ss KeyEvents) String() string

type Modifiers

type Modifiers uint32

Modifiers

const (
	// ModCtrl is the ctrl modifier key.
	ModCtrl Modifiers = 1 << iota
	// ModCommand is the command modifier key
	// found on Apple keyboards.
	ModCommand
	// ModShift is the shift modifier key.
	ModShift
	// ModAlt is the alt modifier key, or the option
	// key on Apple keyboards.
	ModAlt
	// ModSuper is the "logo" modifier key, often
	// represented by a Windows logo.
	ModSuper
)

func (Modifiers) Contain

func (m Modifiers) Contain(m2 Modifiers) bool

Contain reports whether m contains all modifiers in m2.

func (Modifiers) String

func (m Modifiers) String() string

type Registry

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

func New

func New(cl states.Func) *Registry

func (*Registry) Add

func (kbr *Registry) Add(layout states.Enum, keyString string, callback Callback)

func (*Registry) Run

func (kbr *Registry) Run(e KeyEvent)

Jump to

Keyboard shortcuts

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