jskeypressmap

package
v0.0.0-...-948f7eb Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Key2Dir = map[string]way9type.Way9Type{
	"End":        way9type.SouthWest,
	"ArrowDown":  way9type.South,
	"PageDown":   way9type.SouthEast,
	"ArrowLeft":  way9type.West,
	"Clear":      way9type.Center,
	"ArrowRight": way9type.East,
	"Home":       way9type.NorthWest,
	"ArrowUp":    way9type.North,
	"PageUp":     way9type.NorthEast,
}

Functions

This section is empty.

Types

type KeyPressMap

type KeyPressMap struct {
	KeyboardPressedMap map[string]bool
	// contains filtered or unexported fields
}

func New

func New() *KeyPressMap

func (*KeyPressMap) IsPressed

func (kpm *KeyPressMap) IsPressed(kcode string) bool

func (*KeyPressMap) KeyDown

func (kpm *KeyPressMap) KeyDown(kcode string) bool

func (*KeyPressMap) KeyUp

func (kpm *KeyPressMap) KeyUp(kcode string) bool

func (*KeyPressMap) SumMoveDxDy

func (kpm *KeyPressMap) SumMoveDxDy(
	key2dir map[string]way9type.Way9Type) (int, int)

Jump to

Keyboard shortcuts

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