4 ms·
How would the browser even know that, since the keyboard is sending the different codes over the wire.
by slig 3y ago
How would the browser even know that, since the keyboard is sending the different codes over the wire.
- zamadatix 3y agoYou've pretty much dug out your own answer: The browser exposes both event.key and event.code in the keypress event. If it didn't life would be pretty miserable for interactive content expecting positional things like wasd.
- slig 3y agoThe parent of the comment I replied said that their kb lies about the key being pressed, so there's no way for the browser to know and fingerprint the user as the comment I replied implied.
- creesch 3y agoTell me you haven't read the article without telling me you haven't read the article ;) Not only does your browser know the character code, it knows the key that is pressed. For details I do recommend reading the article itself.
- slig 3y agoI did read the article. The parent of the comment I replied to said that their keyboard lies about the key being pressed.