Code Monkey home page Code Monkey logo

node-evdev's People

Contributors

anbraten avatar christophgysin avatar ediskandarov avatar pixnbits avatar sdumetz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

node-evdev's Issues

Error: ESPIPE: invalid seek

This is likely not a library issue, but user error. I'm really not sure what I'm missing here, though.

I'm trying to recognize events coming from a simple USB gamepad under linux. I've got things working with the legacy, "jsdev" method via the node-joystick package, but I'm trying to switch to the evdev method.

I can cat /dev/input/by-id/usb-0810_usb_gamepad-event-joystick and see output as I press buttons, so it seems that the kernel is functioning properly, but when I run the index.js in this package, the output is as follows:

root@DietPi ~/t/n/evdev# ./index.js
searching for event streams matching undefined in : /dev/input/by-path
found 4 inputs
{ bustype: 3, vendor: 2064, product: 58625, version: 272 }
reader error :  { Error: ESPIPE: invalid seek, read errno: -29, code: 'ESPIPE', syscall: 'read' }
root@DietPi ~/t/n/evdev#

I would love a hint on this. What might be going wrong and what can I do about it?

Any help would be very much appreciated! Thanks!

multiple inputs same events

How can is isolate an event to a specific input? I'm monitoring events on multiple inputs with the same events so need to get a handle on both the event and the input that made it.

DeviceReader error events are not forwarded to EvdevReader

The following code throws Unhandled 'error' event error.

const EvdevReader = require("evdev");

const reader = new EvdevReader();
reader.on("error", (error) => console.log(error))

reader.open("/dev/null");

There is as expected a TypeError: Inappropriate ioctl for device error emitted by DeviceReader.init, but I would expect this error to be captured by the EvdevReader which in turn would emit an error event of its own.

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.