openfl/openfl-html5 — pull request #7 by Rezmason (2013-06-27 01:18:23+00:00)
Title: Resizing root movieclip and piggybacking keyboard events on input events from a hidden text area

OpenFL's key down and key up events currently have no charCode property, because browsers are dumb.

This openfl-html5 backend was modified to add a TextAreaElement (hidden in a DivElement) to the jeash wrapper, to maintain keyboard focus on this text area, and to intercept its input events to populate the charCode property on keyboard events. While this implementation doesn't offer much support for IMEs and doesn't match the Flash charCode values for keyUp events when the Shift key is lifted, it's still a measurable improvement. It also makes inroads toward adding support for Flash TextEvents being dispatched from text fields.

The other change here is with the graphics in the root movieclip. By adding an event listener to the Stage for resize events, I'm making sure that the hitarea always extends to the edges of the stage.

This is my first pull request! Thanks for making it easy to do this with OpenFL. :-)