Keyboard event logger

This working example logs JavaScript key events being fired on the document. Relates to Success Criterion 2.1.4 Character Key Shortcuts.

This paragraph has a role="application" to force Windows-based assistive tech (like JAWS and NVDA) to pass keyboard events directly to the page, rather than intercepting them.

Output

Log of all JavaScript key events (keydown, keyup, keypress). Also flags if the key event relates to a printable character, meaning it's a character key. New events appear at the top of the ouput.