Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined event #3

Open
Clement-TS opened this issue Sep 15, 2016 · 0 comments
Open

Undefined event #3

Clement-TS opened this issue Sep 15, 2016 · 0 comments
Labels

Comments

@Clement-TS
Copy link

Hi there!
thank you for this project, it is exactly what I was looking for. However I have an issue at my first try:

~/project/node_modules/input-event/lib/keyboard.js:18
    if(InputEvent.EVENT_TYPES.EV_KEY == ev.type){
                                          ^

TypeError: Cannot read property 'type' of undefined

My implementation is quite simple:

'use strict';

var InputEvent = require('input-event');

var mice = new InputEvent('/dev/input/mice');
var mouse = new InputEvent.Mouse(mice);

mouse.on('keyup'   , console.log.bind(null, 'mice:'));
mouse.on('keydown' , console.log.bind(null, 'mice:'));
mouse.on('keypress', console.log.bind(null, 'mice:'));

I'm running it on an Ubuntu 16.04, reproducing the error with both node v0.10.45 and node v6.3.0. Do you have any clue?

@lsongdev lsongdev added the bug label May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants