Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

Handle Arrow keys inside iframe

A topic by Wild Spike created Oct 20, 2017 Views: 232 Replies: 2
Viewing posts 1 to 3


Recently I add html5 game with keyboard and mouse support. It works fine as standalone html5 application. But arrow keys doesn't forwarded into game on this site.

Problem -

Works fine -

Is it possible to fix on yours or my side?

Admin (1 edit)

What game engine are you using? Some engines bind to event handlers in a way that isn't friendly with iframes. Here's a discussion about the problem with someone using pixi.js:


Thank you for reply. I use my own game engine. Here is workaround:

postRun: (function() {
                window.addEventListener('mousedown', function(evt) {
           = 'default';
                }, false);