device

package
v0.0.0-...-4e4ff22 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device interface {
	Description() string

	// Listen asynchronously listens for key presses.
	Listen() error

	// NoteOn sets a callback function for when a key is pressed.
	NoteOn(func(key uint8))

	// NoteOn sets a callback function for when a key is released.
	NoteOff(func(key uint8))

	// SetDebug enables or disables debug logging.
	SetDebug(bool)

	Close() error
}

func ListDevices

func ListDevices() (devices []Device, err error)

Jump to

Keyboard shortcuts

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