modifiers

Helper functions that simplifys using PluginContext.getModifiers()
Global Variables
allPressed( [modifierState], modifiers )
anyPressed( [modifierState], modifiers )

Helper functions that simplifys using PluginContext.getModifiers()

This method is used to detect the modifier keys that were held down when a plug-in's menu item was clicked.

These methods can also be used when interpreting various InputEvents in event listeners.

Global Variables

The library defines several constants to represent the different modifier keys. Modifiers are encoded as bit masks: to represent multiple keys, take their logical OR. For example, Control and Shift together is represented by the expression CONTROL|SHIFT.

SHIFT represents the Shift key
CONTROL represents the Control key
CTRL same as CONTROL (different platforms use different spellings)
ALT represents the Alt key
META represents the Meta key found on some *NIX systems
COMMAND represents the Command key under OS X (the same value as META)
MENU represents the key used for menu accelerators on this platform (Control on Windows, Command on OS X)

allPressed( [modifierState], modifiers )

Returns true if all of the modifier keys represented by modifiers are indicated by modifierState as being pressed.

modifierState optional bits indicating the modifiers to test against; defaults to PluginContext.getModifiers().
modifiers the logical OR of all modifiers to include in the test

anyPressed( [modifierState], modifiers )

Returns true if any of the modifier keys represented by modifiers are indicated by modifierState as being pressed.

modifierState optional bits indicating the modifiers to test against; defaults to PluginContext.getModifiers().
modifiers the logical OR of all modifiers to include in the test

Contents