HTML | KeyboardEvent which Property
The KeyboardEvent which property is used for returning the Unicode character code of the key which triggers the onkeypress event. It also returns the Unicode key code of the key that triggered the onkeydown or onkeyup event.
The key code is a number which represents an actual key on the keyboard, unlike the character codes which represents the ASCII character.
Below program illustrates the KeyboardEvent which property :
Example: Returning the Unicode character code of the key.
After clicking the button
- Internet Explorer
- Google Chrome
- Apple Safari
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.