keybind

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ByKey  = map[keyboard.Key]Keybind{}
	ByChar = map[rune]Keybind{}
)

Functions

func BindChar

func BindChar(c rune, bind Keybind)

func BindKey

func BindKey(key keyboard.Key, bind Keybind)

func HandlePress

func HandlePress(c rune, key keyboard.Key)

func Listen

func Listen()

func RegisterDefaultKeybinds

func RegisterDefaultKeybinds()

Types

type Keybind

type Keybind struct {
	Handler              func()
	KeyName, Description string
}

func ListBinds

func ListBinds() []*Keybind

Jump to

Keyboard shortcuts

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