KeyEventFlags KeyEventFlags Enum


Enumerates values returned by several types and taken as a parameter of several methods of KeyEvent.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

public enum KeyEventFlags
type KeyEventFlags = 


Canceled Canceled 32

When associated with up key events, this indicates that the key press has been canceled.

CanceledLongPress CanceledLongPress 256

Set when a key event has Canceledset because a long press action was executed while it was down.

EditorAction EditorAction 16

This mask is used for compatibility, to identify enter keys that are coming from an IME whose enter key has been auto-labelled "next" or "done".

Fallback Fallback 1024
FromSystem FromSystem 8

This mask is set if an event was known to come from a trusted part of the system.

KeepTouchMode KeepTouchMode 4

This mask is set if we don't want the key event to cause us to leave touch mode.

LongPress LongPress 128

This flag is set for the first key repeat that occurs after the long press timeout.

SoftKeyboard SoftKeyboard 2

This mask is set if the key event was generated by a software keyboard.

Tracking Tracking 512

Set for Upwhen this event's key code is still being tracked from its initial down.

VirtualHardKey VirtualHardKey 64

This key event was generated by a virtual (on-screen) hard key area. Typically this is an area of the touchscreen, outside of the regular display, dedicated to "hardware" buttons.

WokeHere WokeHere 1

This mask is set if the device woke because of this key event.


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