Add support for new, improved JavaScript key events.
Fix typo.