Web APIs | MDN
When key 2 is pressed, another keydown event is fired for this new key press, and the key property value for the event is set to the string for the keyboard type and " for the UK keyboard type, because of the active modifier shift key. The beforeinput and input events are fired next because a character key has been produced.