- metaState
- The meta state to consider.
- modifiers
- The meta state of the modifier keys to check. May be a combination of modifier meta states as defined by KeyEvent.ModifierMetaStateMask. May be 0 to ensure that no modifier keys are pressed.
Documentation for this section has not yet been entered.
Type Reason Java.Lang.IllegalArgumentException if the modifiers parameter contains invalid modifiers
Returns true if only the specified modifier keys are pressed according to the specified meta state. Returns false if a different combination of modifier keys are pressed.
For the purposes of this function, KeyEvent.KEYCODE_CAPS_LOCK, KeyEvent.KEYCODE_SCROLL_LOCK, and KeyEvent.KEYCODE_NUM_LOCK are not considered modifier keys. Consequently, this function ignores KeyEvent.META_CAPS_LOCK_ON, KeyEvent.META_SCROLL_LOCK_ON and KeyEvent.META_NUM_LOCK_ON.
If the specified modifier mask includes directional modifiers, such as KeyEvent.META_SHIFT_LEFT_ON, then this method ensures that the modifier is pressed on that side. If the specified modifier mask includes non-directional modifiers, such as KeyEvent.META_SHIFT_ON, then this method ensures that the modifier is pressed on either side. If the specified modifier mask includes both directional and non-directional modifiers for the same type of key, such as KeyEvent.META_SHIFT_ON and KeyEvent.META_SHIFT_LEFT_ON, then this method throws an illegal argument exception.