Android.Views.KeyEvent.MetaStateHasModifiers Method
Returns true if only the specified modifier keys are pressed according to the specified meta state.

Syntax

[Android.Runtime.Register("metaStateHasModifiers", "(II)Z", "")]
public static bool MetaStateHasModifiers ([Android.Runtime.GeneratedEnum] MetaKeyStates metaState, [Android.Runtime.GeneratedEnum] MetaKeyStates modifiers)

See Also

KeyEvent.HasModifiers(MetaKeyStates)

Parameters

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.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionif the modifiers parameter contains invalid modifiers

Remarks

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.

[Android Documentation]

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 11