Skip to content

A Go package for communicating with the Linux input file-system

License

Notifications You must be signed in to change notification settings

nathan-fiscaletti/dev-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

A Go package for communicating with the Linux input file-system

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages