Undefined event
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript, linux
调研方向
首先阅读第18行附近的 lib/keyboard.js,并在报告中的 Node 和 Ubuntu 版本上使用 /dev/input/mice 重现该故障。追踪事件值为何为 undefined,然后验证鼠标事件监听器在处理设备输入时不再崩溃。
由索引模型根据 Issue 内容生成。
描述
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?
- 主要语言
- JavaScript
- 星标
- 65
- 派生
- 22
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
lsongdev/input-event 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 42/100
lsongdev/input-event#22 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 25/100
lsongdev/input-event#21 · 3 条评论 ·
-
难度 4/5 3-5 天 新手友好度 30/100
lsongdev/input-event#16 · 1 条评论 ·
-
难度 3/5 1-2 天 新手友好度 25/100
lsongdev/input-event#13 · 1 条评论 ·
-
help wanted
难度 5/5 一周以上 新手友好度 25/100
lsongdev/input-event#10 · 1 个 reaction ·
查看 lsongdev/input-event 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
curriculum documentation quality
难度 2/5 1-3 小时 新手友好度 78/100
githubnext/gh-aw-workshop#3897 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
agent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
难度 2/5 1-3 小时 新手友好度 91/100
维护者通常 1 天内回复