KeyEvent class

A custom KeyboardEvent that attempts to eliminate cross-browser
inconsistencies, and also provide both keyCode and charCode information
for all key events (when such information can be determined).

KeyEvent tries to provide a higher level, more polished keyboard event
information on top of the "raw" KeyboardEvent.

The mechanics of using KeyEvents is a little different from the underlying
KeyboardEvent. To use KeyEvents, you need to create a stream and then add
KeyEvents to the stream, rather than using the EventTarget.dispatchEvent.
Here's an example usage: