Press a keyboard key in the input field and display the value:
The keyCode property is deprecated, use the key property instead.