Presently the Browser object will return triggers On Suspended and On Resumed when the game tab comes back into focus when switching back from a new tab or if the game was minified into the task bar. For very sensible security reasons, a blurred or out of focus game is unable to register key down and key up triggers during the time is is blurred - which means that the c2 key is down will incorrectly register a key position as down if it misses the key up trigger. If you code your events only using key down/up triggers then you also cannot detect key triggers when the game is out of focus. Using the browser On Suspended and Resumed triggers allows you to code your events to manage the possibility of missing key triggers.
However, it is not possible for c2 developers to set events to detect if the player has returned to a running game after they have clicked on something else on their desktop - although the game loses focus and becomes blurred, the triggers will not fire when focus is regained. For example, if the game is not minified and another program is opened over the top of it then these triggers will not fire, and if the game was in a stand alone browser window and the player just clicks on something else then the triggers will not fire on returning as well.
If you're exporting in nw then these can make your game look rather amateur when the player clicks on something else accidentally or just opens another program momentarily - and then, when they return to the fruits of your hard work, they discover (for example) that they are stuck in a run-right-to-suicide loop until they press the Right key again (the right key release trigger being missed by the game logic).
Now, the debug "pause on unfocus" option clearly uses a more complete not in focus / blur detection system than the aforementioned browser triggers - because it will pause the game in the above 2 situations during preview. This feature request is to give us access to this same blurred / out of focus condition information.
Anyone any thoughts / ideas / comments / work-arounds?