Recent posts by namuol on Kongregate

Flag Post

Topic: Kongregate APIs / Keyboard Events in IFRAME


I’m having trouble with keyboard controls in my HTML5/iframe game (

The basic gist of it is that the game never seems to get “focus” — for some reason keyboard events are never forwarded to it.

One strange workaround I’ve noticed is that when I right click on the game canvas and select “Inspect Element”, then refocus the main browser window, keyboard events are now captured! Anyone know what’s going on here? I’m stumped.