Press a keyboard key in the input field and display the value:
The charCode property is deprecated. Use the key property instead.