Reputation: 9
When I look onto any website that shows JS keycodes, I see that the f# buttons are 112-123, and that 's' is 83. However, I made my website console.log() the keycode of the key I press, and 's' came up as 115. The f# keys don't show up at all. Can someone please help?
Code is just
body.addEventListener('keypress', function() {
var x = event.keyCode;
console.log(x);
});
Upvotes: 0
Views: 39