Skip to main content

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

How to prevent arrow key scrolling (Unity WebGL)

A topic by wampapup created Jan 22, 2016 Views: 1,337 Replies: 1
Viewing posts 1 to 2

Hi all, I threw up a game jam game the other night and ran into a problem with the arrow keys scrolling the page. In the past I've disable this with a *{overflow:hidden;} but that doesn't seem to work inside of the iframe. For now I've included a fullscreen button (which is not ideal) but I'd like to find a way to fix this in future projects.

The game is made in Unity 3D, deployed to the WebGL target. The Game->Baby Rogue

I've also tried some of the solutions that people have posted for other sites with no success. I am not a web developer, so maybe I missed something obvious.

You could be interested in the new 5.3.2 Unity release as it's just mentioned in the changelog:

WebGL: Prevent browser from processing Arrow Keys. (740182)

http://unity3d.com/unity/whats-new/unity-5.3.2