KeyEvent
Represents a keyboard event, inherited from Event, which describes the user's interaction with the keyboard. Each event describes a single interaction between the user and a key, or a key combined with modifier keys.
Instance property
key
Represents the value of the physical key pressed by the user.
repeat
true indicates the key is being held down such that it is automatically repeating.
altKey
true indicates the Alt key, or Option (⌥) on macOS, was active when the key event was generated.
ctrlKey
true indicates the Ctrl key was active when the key event was generated.
metaKey
true indicates the Meta key was active when the key event was generated. On macOS, this is the Command (⌘) key. On Windows, this is the Windows key.
shiftKey
true indicates the Shift key was active when the key event was generated.
KeyEvent type
keydown
Indicates that a key has been pressed.
keyup
Indicates that a key has been released.
Compatibility
LCD tables only load in the browser