Javascript Key Event Test Script

Type keys in the text area below to see the Javascript events triggered and the values returned. Notes on test results from the page are at http://unixpapa.com/js/key.html.

On most browsers, suppressing the default action on keypress events prevents the browser from processing the keystroke. On some browsers, suppressing the default action on keydown prevents keypress or keyup events from triggering. Textinput events normally won't be seen unless you turn off default suppression on keydown and keypress.

Your browser:

Suppress default handling of: keydown     keypress     keyup     textinput
Show attribute values for: classic     modifiers     DOM 3     old DOM 3