How do I Request the Keyboard Focus from C3 game?
It seems that my game does not receive the focus when I start the game.
The game is running inside iframe of course.
The event "ON ANY KEY PRESS" only works if I click the game with mouse first.
I don't know if it's possible to request focus from the inside of an iframe. But you should be able to set focus to iframe from the parent page.
stackoverflow.com/questions/369026/setting-focus-to-iframe-contents
Develop games in your browser. Powerful, performant & highly capable.
I think browsers enforce that you must click/touch inside an iframe before it receives keyboard input for security reasons. Otherwise a hidden iframe could act as a keylogger.