The keyboardEvent key property in HTML is used to return the value of key pressed when a key event occurs. It returns a single character or multi character string depending on which key is pressed. It is a read-only property.
Return Value: It returns a string which represents the key pressed.
It can return single character string like “a”, “5”, “+”, etc.
It can return multi character string like “F5”, “Enter”, “HOME”, etc.
Please Login to comment...