![]() |
VOOZH | about |
Whenever a key is pressed or released, there are certain events that are triggered. Each of these events has a different meaning and can be used for implementing certain functionalities depending on the current state and the key that is being used.
These events that are triggered when a key is pressed are in the following order:
Note that different browsers may have different implementations of the above events. The onKeyDown, onKeyPress, and onKeyUp events can be used to detect these events respectively.
Example: The below example shows different events that get triggered when a key is pressed in their respective order.
Output: