Udostępnij za pośrednictwem


KeyEvent.IsModifierKey(Keycode) Method

Definition

Returns true if this key code is a modifier key.

[Android.Runtime.Register("isModifierKey", "(I)Z", "")]
public static bool IsModifierKey (Android.Views.Keycode keyCode);
[<Android.Runtime.Register("isModifierKey", "(I)Z", "")>]
static member IsModifierKey : Android.Views.Keycode -> bool

Parameters

keyCode
Keycode

Returns

True if the key code is one of #KEYCODE_SHIFT_LEFT#KEYCODE_SHIFT_RIGHT, #KEYCODE_ALT_LEFT, #KEYCODE_ALT_RIGHT, #KEYCODE_CTRL_LEFT, #KEYCODE_CTRL_RIGHT, #KEYCODE_META_LEFT, or #KEYCODE_META_RIGHT, #KEYCODE_SYM, #KEYCODE_NUM, #KEYCODE_FUNCTION.

Attributes

Remarks

Returns true if this key code is a modifier key.

For the purposes of this function, #KEYCODE_CAPS_LOCK, #KEYCODE_SCROLL_LOCK, and #KEYCODE_NUM_LOCK are not considered modifier keys. Consequently, this function return false for those keys.

Java documentation for android.view.KeyEvent.isModifierKey(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