library is not working with more than 2 keyboards
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript
- Lĩnh vực
- operating-systems
Hướng nghiên cứu
Bắt đầu với ví dụ đã sửa đổi trong thư mục example và tái hiện hành vi bằng cách sử dụng /dev/input/event21 và /dev/input/event23, sau đó thêm bàn phím thứ ba như mô tả. Theo dõi cách thư viện đọc và phát các sự kiện cho từng thiết bị trên Ubuntu hoặc Raspberry Pi; hoàn thành khi các sự kiện phím từ tất cả bàn phím được kết nối được ghi nhật ký ngay lập tức và độc lập.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi!
Thank you for this great library.
It is exactly what I need for a project where i have to listen to and be able to distinguish between 4 different keyboard inputs.
I tried it on ubuntu 16.04 and on raspberry pi 3.
Everything works fine with 2 keyboards attached, but unfortunately I get some very strange behaviour when I attach a third one.
I use this slightly modified example code inside of the example folder
const InputEvent = require('../')
let inputSlots = [21, 23]
let inputs = []
let readers = []
for (let i = 0; i < inputSlots.length; i++) {
try {
inputs[i] = new InputEvent(`/dev/input/event${inputSlots[i]}`)
readers[i] = new InputEvent.Keyboard(inputs[i])
readers[i].on('keyup', (data) => { console.log(`reader ${i}: ${data.code}`) })
} catch (err) {
console.error(`Can not open device ${i}`)
}
if (readers[i]) {
readers[i].on('error', (data) => { console.log(`reader ${i}: ${data.code}`) })
}
}
When I adapt the inputSlots array and attach a third keyboard, the keycode doesn't get logged to the console immediately when pressing a key.
I have to press a key on one of the other 2 attached keyboards, then the keycode from before and the keycode from the key that was just pressed are logged.
If i now press another key on this keyboard the thing starts again and i have to press a key on one of the other keyboards in order to log the keycode.
I am wondering if you have ever encountered this problem, or if you happen to know what could be the reason for this behaviour.
I also tried it with the 'keydown' and 'keypress' event, but that didnt change anything.
Thank you very much
Best regards
- Ngôn ngữ chính
- JavaScript
- Star
- 65
- Fork
- 22
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của lsongdev/input-event
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
lsongdev/input-event#22 · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
lsongdev/input-event#21 · 3 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
lsongdev/input-event#16 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
lsongdev/input-event#13 · 1 bình luận ·
-
help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
lsongdev/input-event#10 · 1 reaction ·
Tất cả issue của lsongdev/input-event
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
openlibhums/janeway#5604 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Generic OSC does not initialize OSC client on startup when "Listen for Feedback" is disabledĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
area/statement-execution TS conversion
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
scylladb/nodejs-rs-driver#584 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
新讀者走讀回報,照著一篇文章實際操作Đang mởdocumentation good first issue help wanted
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
Maintainer thường phản hồi trong vòng 2 ngày