共用方式為


KeyEvent.MetaStateHasNoModifiers(MetaKeyStates) Method

Definition

Returns true if no modifiers keys are pressed according to the specified meta state.

[Android.Runtime.Register("metaStateHasNoModifiers", "(I)Z", "")]
public static bool MetaStateHasNoModifiers (Android.Views.MetaKeyStates metaState);
[<Android.Runtime.Register("metaStateHasNoModifiers", "(I)Z", "")>]
static member MetaStateHasNoModifiers : Android.Views.MetaKeyStates -> bool

Parameters

metaState
MetaKeyStates

The meta state to consider.

Returns

True if no modifier keys are pressed.

Attributes

Remarks

Returns true if no modifiers keys are pressed according to the specified meta state.

For the purposes of this function, #KEYCODE_CAPS_LOCK, #KEYCODE_SCROLL_LOCK, and #KEYCODE_NUM_LOCK are not considered modifier keys. Consequently, this function ignores #META_CAPS_LOCK_ON, #META_SCROLL_LOCK_ON and #META_NUM_LOCK_ON.

The meta state is normalized prior to comparison using #normalizeMetaState(int).

Java documentation for android.view.KeyEvent.metaStateHasNoModifiers(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also