Event.modifiers (Property)

A bitmask provided by Netscape, which contains a bit flag for each modifier key.

Availability:

JavaScript - 1.2
Netscape - 4.0
Property/method value type:Number primitive
JavaScript syntax:NmyEvent.modifiers

The modifiers are supplied as a mask which needs to be assembled using bitwise OR techniques from the component values.

The mask values are summarized in this table:

BitConstantEvent type
2^0ALT_MASKThe [alt] key was held down while key was pressed
2^1CONTROL_MASKThe [control] key was held down while key was pressed
2^2SHIFT_MASKThe [shift] key was held down while key was pressed
2^3META_MASKThe [meta] key was held down while key was pressed

See also:Document.releaseEvents(), Event object, Event.altKey, Event.ctrlKey, Event.shiftKey, Keyboard events, Layer.releaseEvents(), onKeyDown, Window.releaseEvents()

Property attributes:

ReadOnly.