Handling Keyboard Events

S

Steve

I've added a javascript game to a web page. The game is using the arrow keys
to control the player's movements. Everything works fine as long as the page
fits on the screen. If there are scroll bars the key events are handled by
both the game and the browser causing the page to scroll while playing. Is
there a way to keep the browser from handling the key event?

Thanks for any help...

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top