I use JavaScript and Prototype and catch keystrokes from the user. I successfully catch return, space and arrows with this code:
Event.observe(window, "keyup", function(e) { switch (e.keyCode) { case Event.KEY_RETURN: case Event.KEY_RIGHT: case 32: // space // do something break; } });
My problem is that spaces and arrows continue to scroll through the page. Is there a way to keep them from scrolling?
javascript prototypejs events scroll keyboard
Pablo
source share