Here are some javascript:
window.addEventListener("keydown", function(event) {
console.log("keydown: " + event.keyCode);
});
window.addEventListener("keyup", function(event) {
console.log("keyup: " + event.keyCode);
});
Here is the result of my pressing and releasing the key only once:
keyup: 17
keydown: 68
keyup: 17
keyup: 68
This applies to my car. Why is this happening?
Note. I discovered this oddity in a flash where KeyboardEvents worked the same way.
source
share