johnmccutchan/game_loop — pull request #49 by Fox32 (2013-10-16 17:47:34+00:00)
Title: Add processAllKeyboardEvents flag to GameLoopHtml 

Writing a game as an web app provides a big advantage as it comes with a good user interface engine. I'm using the input elements in combination with game_loop. Combining the keyboard API of game_loop with input elements cause problems, because the events the input elements receive are also received by the game_loop.

To solve this problem I added a optional processAllKeyboardEvents flag to GameLoopHtml to disable keyboard input while input elements are focused. That means if a user focus an element that can be focused, the game_loop ignores all keyboard elements until no element is focused anymore (no element, means body is focused) e.g. by clicking on the canvas.
As this change may break the workflow for other users, processAllKeyboardEvents defaults to true and keeps the current behavior.