I am writing several test applications that perform simple keyboard grabbing.
I have no problem with this basic approach.
But now I need a better experience with my application, and I want to connect at least two or more USB or PS / 2 keyboards, distinguishing which keyboard is the source of key events, and therefore the ability to use a web browser locally with JavaScript (and HTML5) as if it were a game console with several controllers for several players simultaneously.
I know that even on Windows or Linux, the normal behavior is to force multiple keyboards to fire the same events. However, I also know that it would be entirely possible to find out which particular keyboard hardware device generated this event.
Is this possible or is this a limitation in JavaScript? There will probably be support in the future to support the distinction of multiple input devices of the same basic type, is there some kind of alternative, at least with HTML5, or will it be an almost lost hope, speaking in the context of a web browser, JavaScript and HTML5?
source share