I am trying to print keyboard input automatically in webpage through java script in chromeOS/chromebook but not getting the desired output. Any suggestions?
Asked
Active
Viewed 128 times
-1
-
you'll need to write some code, as there is nothing to do this "automatically" – Jaromanda X Jun 22 '17 at 05:12
-
@JaromandaX , automatically here means though code(as i am using JavaScript) . Let me know if you have any suggestions to this question – Tisa Jun 22 '17 at 05:29
-
`not getting the desired output` suggests you've tried something - how about you share it so that this question doesn't just look like a request for code – Jaromanda X Jun 22 '17 at 05:33
1 Answers
0
take a look at keycodes
document.onkeyup = function(e) {
console.log(e.keyCode)
}
they map to specific keys on your keyboard. from there you can reduce each key press to each interaction on the board
https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes

random-forest-cat
- 33,652
- 11
- 120
- 99