library is not working with more than 2 keyboards
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- operating-systems
Direzione di ricerca
Inizia con l’esempio modificato nella cartella example e riproduci il comportamento usando /dev/input/event21 e /dev/input/event23; quindi aggiungi una terza tastiera come descritto. Traccia il modo in cui la libreria legge ed emette gli eventi per ogni dispositivo su Ubuntu o Raspberry Pi; il lavoro è completato quando gli eventi dei tasti di tutte le tastiere collegate vengono registrati immediatamente e in modo indipendente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- JavaScript
- Stelle
- 65
- Fork
- 22
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di lsongdev/input-event
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
lsongdev/input-event#22 · 1 reazione ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
lsongdev/input-event#21 · 3 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
lsongdev/input-event#16 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
lsongdev/input-event#13 · 1 commento ·
-
help wanted
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
lsongdev/input-event#10 · 1 reazione ·
Tutte le issue di lsongdev/input-event
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
code-yeongyu/oh-my-openagent#10172 ·
I maintainer di solito rispondono entro 1 giorno
-
Phase 2 PSA Capability & Career Profile
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
bcgov/digital-journeys#2310 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
nodejs/node#66743 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OWASP/cve-lite-cli#1335 ·
I maintainer di solito rispondono entro 1 giorno
-
Channels status: needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
mastra-ai/mastra#27093 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno