stick

package
v0.0.0-...-c2ff2fd Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Overview

This does not works for Windows just for Linux

Index

Constants

View Source
const (
	Enter  = 28
	Tab    = 15
	Cero   = 11
	Uno    = 2
	Dos    = 3
	Tres   = 4
	Cuatro = 5
	Cinco  = 6
	Seis   = 7
	Siete  = 8
	Ocho   = 9
	Nueve  = 10
	A      = 30
	B      = 48
	C      = 46
	D      = 32
	E      = 18
	F      = 33
	G      = 34
	H      = 35
	I      = 23
	J      = 36
	K      = 37
	L      = 38
	M      = 50
	N      = 49
	O      = 24
	P      = 25
	Q      = 16
	R      = 19
	S      = 31
	Z      = 44
	W      = 17
	X      = 45
	Te     = 20
	Dot    = 52
	Slash  = 53
)

Key constants

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	Events chan Event
	// contains filtered or unexported fields
}

Device sense

func Open

func Open(name string) (*Device, error)

Open and Sense some you wants device like keyboard and start polling for events

func (*Device) Name

func (d *Device) Name() string

Name returns the device name

func (*Device) Send

func (d *Device) Send(code uint16)

Send sends an Event based on the provided code

type Event

type Event struct {
	Time  syscall.Timeval
	Type  uint16
	Code  uint16
	Value int32
}

Event represents a input event from the Sense Hat joystick

Jump to

Keyboard shortcuts

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