Undefined event
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, linux
- Domain
- operating-systems
Research direction
Start by reading lib/keyboard.js around line 18 and reproduce the failure using /dev/input/mice on the reported Node and Ubuntu versions. Trace why the event value is undefined, then verify that mouse event listeners no longer crash when processing device input.
Written by the indexing model from the issue text.
Description
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?
- Dominant language
- JavaScript
- Stars
- 65
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lsongdev/input-event
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
lsongdev/input-event#22 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
lsongdev/input-event#21 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
lsongdev/input-event#16 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
lsongdev/input-event#13 · 1 comment ·
-
help wanted
Difficulty 5/5 Over a week Newbie friendliness 25/100
lsongdev/input-event#10 · 1 reaction ·
All issues in lsongdev/input-event
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
daisy/a11y-meta-viewer#18 ·
-
good first issue status: needs triaging type: bug version: 2.0
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
medusajs/medusa#17094 · 2 comments ·
Maintainers usually reply within 1 day
-
browser: chrome package: @carbon/react package: styles
Difficulty 1/5 Under an hour Newbie friendliness 92/100
carbon-design-system/carbon#23567 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
clerk/javascript#10033 ·
Maintainers usually reply within 1 day
-
bug client p1
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vercel/eve#4173 · 2 comments ·
Maintainers usually reply within 1 day