Android.Views.KeyEvent Members

The members of Android.Views.KeyEvent are listed below.

See Also: Inherited members from Android.Views.InputEvent

Public Constructors

Make an exact copy of an existing key event.
Create a new key event.
Create a new key event.
Copy an existing key event, modifying its time and repeat count.
Create a new key event for a string of characters.
Create a new key event.
Create a new key event.
Create a new key event.
Create a new key event.

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Fields

const
MaxKeycodeint (84).

Public Properties

[read-only]
ActionKeyEventActions. Retrieve the action of this key event.
[read-only]
Charactersstring. For the special case of a KeyEvent.ACTION_MULTIPLE event with key code of KeyEvent.KEYCODE_UNKNOWN, this is a raw string of characters associated with the event.
[read-only]
static
CreatorAndroid.OS.IParcelableCreator.
[read-only]
override
DeviceIdint. Gets the id for the device that this event came from.
[read-only]
DisplayLabelchar. Gets the primary character for this key.
[read-only]
DownTimelong. Retrieve the time of the most recent key down event, in the Android.OS.SystemClock.UptimeMillis time base.
[read-only]
override
EventTimelong. Retrieve the time this event occurred, in the Android.OS.SystemClock.UptimeMillis time base.
[read-only]
FlagsKeyEventFlags. Returns the flags for this key event.
[read-only]
HasNoModifiersbool. Returns true if no modifier keys are pressed.
[read-only]
IsAltPressedbool.
[read-only]
IsCanceledbool. For KeyEvent.ACTION_UP events, indicates that the event has been canceled as per KeyEvent.FLAG_CANCELED.
[read-only]
IsCapsLockOnbool.
[read-only]
IsCtrlPressedbool.
[read-only]
IsFunctionPressedbool.
[read-only]
IsLongPressbool. For KeyEvent.ACTION_DOWN events, indicates that the event has been canceled as per KeyEvent.FLAG_LONG_PRESS.
[read-only]
IsMetaPressedbool.
[read-only]
IsNumLockOnbool.
[read-only]
IsPrintingKeybool. Returns true if this key produces a glyph.
[read-only]
IsScrollLockOnbool.
[read-only]
IsShiftPressedbool.
[read-only]
IsSymPressedbool.
[read-only]
IsSystembool. Is this a system key? System keys can not be used for menu shortcuts.
[read-only]
IsTrackingbool. For KeyEvent.ACTION_UP events, indicates that the event is still being tracked from its initial down event as per KeyEvent.FLAG_TRACKING.
[read-only]
KeyCharacterMapKeyCharacterMap. Gets the Android.Views.KeyCharacterMap associated with the keyboard device.
[read-only]
KeyCodeKeycode. Retrieve the key code of the key event.
[read-only]
static
MaxKeyCodeKeycode. Returns the maximum keycode.
[read-only]
MetaStateMetaKeyStates.
[read-only]
static
ModifierMetaStateMaskMetaKeyStates. Gets a mask that includes all valid modifier key meta state bits.
[read-only]
ModifiersMetaKeyStates. Returns the state of the modifier keys.
[read-only]
Numberchar. Gets the number or symbol associated with the key.
[read-only]
RepeatCountint. Retrieve the repeat count of the event.
[read-only]
ScanCodeint. Retrieve the hardware key id of this key event.
[read-only]
override
SourceInputSourceType. Gets the source of the event.
[read-only]
UnicodeCharint. Gets the Unicode character generated by the specified key and meta key state combination.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

static
ChangeAction(KeyEvent, KeyEventActions) : KeyEvent
Create a new key event that is the same as the given one, but whose action is replaced with the given value.
static
ChangeFlags(KeyEvent, KeyEventFlags) : KeyEvent
Create a new key event that is the same as the given one, but whose flags are replaced with the given value.
static
ChangeTimeRepeat(KeyEvent, long, int) : KeyEvent
Create a new key event that is the same as the given one, but whose event time and repeat count are replaced with the given value.
static
ChangeTimeRepeat(KeyEvent, long, int, KeyEventFlags) : KeyEvent
Create a new key event that is the same as the given one, but whose event time and repeat count are replaced with the given value.
override
DescribeContents() : int
Documentation for this section has not yet been entered.
Dispatch(KeyEvent.ICallback) : bool
Dispatch(KeyEvent.ICallback, KeyEvent.DispatcherState, Java.Lang.Object) : bool
Deliver this key event to a NoType:android/view/KeyEvent$Callback;Href=../../../reference/android/view/KeyEvent.Callback.html interface.
static
GetDeadChar(int, int) : int
Get the character that is produced by putting accent on the character c.
GetKeyData(KeyCharacterMap.KeyData) : bool
Get the character conversion data for a given key code.
GetMatch(char[]) : char
Gets the first character in the character array that can be generated by the specified key code.
GetMatch(char[], MetaKeyStates) : char
Gets the first character in the character array that can be generated by the specified key code.
GetMatch(char[], int) : char
Documentation for this section has not yet been entered.
GetUnicodeChar(MetaKeyStates) : int
Gets the Unicode character generated by the specified key and meta key state combination.
HasModifiers(MetaKeyStates) : bool
Returns true if only the specified modifiers keys are pressed.
static
IsGamepadButton(Keycode) : bool
Returns true if the specified keycode is a gamepad button.
static
IsModifierKey(Keycode) : bool
Returns true if this key code is a modifier key.
static
KeyCodeFromString(string) : Keycode
Gets a keycode by its symbolic name such as "KEYCODE_A" or an equivalent numeric constant such as "1001".
static
KeyCodeToString(Keycode) : string
Returns a string that represents the symbolic name of the specified keycode such as "KEYCODE_A", "KEYCODE_DPAD_UP", or an equivalent numeric constant such as "1001" if unknown.
static
MetaStateHasModifiers(MetaKeyStates, MetaKeyStates) : bool
Returns true if only the specified modifier keys are pressed according to the specified meta state.
static
MetaStateHasNoModifiers(MetaKeyStates) : bool
Returns true if no modifiers keys are pressed according to the specified meta state.
static
NormalizeMetaState(MetaKeyStates) : MetaKeyStates
Normalizes the specified meta state.
SetSource(InputSourceType)
Modifies the source of the event.
StartTracking()
Call this during NoType:android/view/KeyEvent$Callback;Href=../../../reference/android/view/KeyEvent.Callback.html#onKeyDown(int, android.view.KeyEvent) to have the system track the key through its final up (possibly including a long press).
override
WriteToParcel(Android.OS.Parcel, Android.OS.ParcelableWriteFlags)
Flatten this object in to a Parcel.