evdev

package
v0.0.0-...-949aa5c Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EV_SYN = uint16(0x00)
	EV_KEY = uint16(0x01)
	EV_REL = uint16(0x02)
)

Variables

View Source
var ErrDeviceNotFound = errors.New("device not found")

Functions

This section is empty.

Types

type Device

type Device interface {
	Read() (*InputEvent, error)
}

func NewDevice

func NewDevice(d *evdev.InputDevice) Device

type Finder

type Finder interface {
	Find(phys string) (Device, error)
}

func NewFinder

func NewFinder() Finder

type InputEvent

type InputEvent struct {
	Time  syscall.Timeval // time in seconds since epoch at which event occurred
	Type  uint16          // event type - one of ecodes.EV_*
	Code  uint16          // event code related to the event type
	Value int32           // event value related to the event type
}

Directories

Path Synopsis
Package evdevmock is a generated GoMock package.
Package evdevmock is a generated GoMock package.

Jump to

Keyboard shortcuts

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