Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Arrow keys moving the page

A topic by cubeguy11 created Apr 17, 2023 Views: 240 Replies: 2
Viewing posts 1 to 2

Hey everyone, I was recently trying to upload an html5 game that I made however I ran into an issue, the game uses the up and down arrow keys and I am trying to make the game play in the itch page. However when you press the up and down keys the whole page moves up and down. Is there anyway to fix this?

Moderator

You have to call the preventDefault method on the event object in your code.

(+1)

Thanks so much, it worked!

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.