Skip to content

Keys

key_code is the physical key, KeyboardEvent.code (KeyA, Digit4, ShiftLeft, ...): the model needs it to recognise a typist. Physical keys are layout-independent, but together with their order they reveal most of what was typed, so treat the data as personal data and tell your users (see the notice). Fields listed in Excluded input send nothing.

key_char is always a coarse class, never the character. A key in class mode sends classes in key_code too (the API also masks them on arrival); such sessions are scored on mouse movement only.

Class KeyboardEvent.code values
Letter KeyA to KeyZ
Digit Digit0 to Digit9, Numpad0 to Numpad9
Space Space
Punct Minus Equal BracketLeft BracketRight Backslash Semicolon Quote Backquote Comma Period Slash IntlBackslash, numpad operators
named keys Unchanged: Backspace Enter Tab ShiftLeft ArrowUp Escape ...
Unidentified The browser reported no code.