GithubHelp home page GithubHelp logo

viamrobotics / evdev Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kenshaw/evdev

3.0 1.0 0.0 166 KB

Package evdev provides input and uinput handling on Linux.

License: Other

Go 99.38% Shell 0.62%

evdev's Introduction

About evdev

evdev is a libevdev inspired Go package for working with Linux input devices. evdev works by making ioctl system calls for the Linux input and uinput subsystems. Because evdev is written in pure Go, it can be used without CGO.

evdev is used to poll events from, and send events to /dev/input/event* devices. Additionally, evdev provides the ability to create virtual uinput devices that can be used similarly.

evdev is a rewrite of the github.com/jteeuwen/evdev package. Most of the credit for this package goes to jteeuwen for the original (and amazing!) work done.

Installing

evdev can be installed in the usual Go fashion:

$ go get -u github.com/kenshaw/evdev

Using

Please see the examples directory for more examples.

Permission Issues

Reading events from input devices or creating virtual uinput devices requires $USER to have the appropriate system-level permissions. This can be accomplished by adding $USER to a group with read/write access to /dev/input/event* and uinput block devices.

Please refer to your relevant Linux distribution's documentation on adding $USER to the appropriate system group, or otherwise allowing read/write access to /dev/input/event* and uinput devices.

Note: if adding a group to the current $USER, it will be necessary to log out and log back in before the system recognizes the group membership.

Ubuntu/Debian

On Ubuntu/Debian systems, the current $USER can be added to the input group:

$ sudo adduser $USER input

evdev's People

Contributors

goen avatar kenshaw avatar otterverse avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.