input

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Unlicense Imports: 5 Imported by: 0

Documentation

Overview

package input implements an input driver for the joystick and buttons on the Waveshare 1.3" 240x240 HAT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(ch chan<- Event) error

Types

type Button

type Button int
const (
	Up Button = iota
	Down
	Left
	Right
	Center
	Button1
	Button2
	Button3
	// Synthetic keys only generated in debug mode.
	Rune       // Enter rune.
	Screenshot // Dump a screenshot to the SD card.
)

type Event

type Event struct {
	Button  Button
	Pressed bool
	// Rune is only valid if Button is Rune.
	Rune rune
}

Jump to

Keyboard shortcuts

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