Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.05 KB

README.md

File metadata and controls

40 lines (29 loc) · 1.05 KB

dev-input

Sponsor Me! GoDoc

This is a simple package for communicating with the Linux input filesystem.

Features

  • List input devices
  • Filter input devices by event
    • Build in filters for keyboards, pointers and touch-pads
  • Check if a device supports a particular event
  • Check if a device supports a particular key-code
  • Read events from input devices

Usage

go get github.com/nathan-fiscaletti/dev-input
package main

import "github.com/nathan-fiscaletti/dev-input"

func main() {
	keyboards, err := input.ListKeyboards()
	if err != nil {
		panic(err)
	}

	for _, keyboard := range keyboards {
		fmt.Printf("Keyboard: %s\n", keyboard.Name)
	}
}

See the Go Docs for more detailed usage.