KeyboardEvent
KeyboardEvent
objects describe a user interaction with the keyboard; each event describes a single interaction between the user and a key (or combination of a key with modifier keys) on the keyboard.
Properties
The KeyboardEvent.isComposing
read-only property returns a boolean value indicating if the event is fired within a composition session, i.e., after Element/compositionstart_event and before Element/compositionend_event.
The KeyboardEvent.location
read-only property returns an unsigned long
representing the location of the key on the keyboard or other input device.
Functions
The KeyboardEvent.getModifierState()
method returns the current state of the specified modifier key: true
if the modifier is active (that is the modifier key is pressed or locked), otherwise, false
.