evdev

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EvSyn = iota
	EvKey
	EvRel
	EvAbs
	EvMsc
	EvSw
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	Name string
	ID   InputID
	// contains filtered or unexported fields
}

func Open

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

func (*Device) Close

func (d *Device) Close() error

func (*Device) HasEventCode

func (d *Device) HasEventCode(t, code uint16) bool

func (*Device) HasEventType

func (d *Device) HasEventType(t uint16) bool

func (*Device) NextEvent

func (d *Device) NextEvent() (InputEvent, error)

type InputEvent

type InputEvent struct {
	Type  uint16
	Code  uint16
	Value int32
}

func (InputEvent) Is

func (ev InputEvent) Is(t, code uint16) bool

type InputID added in v0.3.2

type InputID struct {
	BusType uint16
	Vendor  uint16
	Product uint16
	Version uint16
}

Jump to

Keyboard shortcuts

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