key

package
Version: v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: MIT Imports: 2 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 string

Key represents one keyboard stroke.

type Manager

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

Manager holds the key mappings and current key sequence.

func NewManager

func NewManager(count bool) *Manager

NewManager creates a new Manager.

func (*Manager) Press

func (km *Manager) Press(k Key) event.Event

Press checks the new key down event.

func (*Manager) Register

func (km *Manager) Register(eventType event.Type, keys ...Key)

Register adds a new key mapping.

func (*Manager) RegisterBang

func (km *Manager) RegisterBang(eventType event.Type, keys ...Key)

RegisterBang adds a new key mapping with bang.

Source Files

Jump to

Keyboard shortcuts

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