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.
<title>KeyboardEvent which Property in HTML</title>
<h2>KeyboardEvent which Property</h2>
<p> To get the Unicode character code of the key,
Press the key on the keyboard in the input field.</p>
Please Login to comment...