I'm developing a game in HTML5, and in my game you use the spacebar to shoot. This worked fine until I realized that on smaller screens the spacebar would scroll to the bottom of the page, hiding part of the game. How can I stop the browser's hotkeys from making the page scroll down? Or how can I freeze the scrolling where the person has it when they click the canvas. Here is the game's link: http://73.9.75.150:8886/zn/index.html
Key handling code:
window.addEventListener("keydown", function(e){
keys[e.keyCode] = true;
});
window.addEventListener("keyup", function(e){
keys[e.keyCode] = false;
});