Input

Summary

Enumerations

Anonymous Enum 32{
  AKEY_STATE_UNKNOWN = -1,
  AKEY_STATE_UP = 0,
  AKEY_STATE_DOWN = 1,
  AKEY_STATE_VIRTUAL = 2
}
enum
Key states (may be returned by queries about the current state of a particular key code, scan code or switch).
Anonymous Enum 33{
  AMETA_NONE = 0,
  AMETA_ALT_ON = 0x02,
  AMETA_ALT_LEFT_ON = 0x10,
  AMETA_ALT_RIGHT_ON = 0x20,
  AMETA_SHIFT_ON = 0x01,
  AMETA_SHIFT_LEFT_ON = 0x40,
  AMETA_SHIFT_RIGHT_ON = 0x80,
  AMETA_SYM_ON = 0x04,
  AMETA_FUNCTION_ON = 0x08,
  AMETA_CTRL_ON = 0x1000,
  AMETA_CTRL_LEFT_ON = 0x2000,
  AMETA_CTRL_RIGHT_ON = 0x4000,
  AMETA_META_ON = 0x10000,
  AMETA_META_LEFT_ON = 0x20000,
  AMETA_META_RIGHT_ON = 0x40000,
  AMETA_CAPS_LOCK_ON = 0x100000,
  AMETA_NUM_LOCK_ON = 0x200000,
  AMETA_SCROLL_LOCK_ON = 0x400000
}
enum
Meta key / modifier state.
Anonymous Enum 34{
  AINPUT_EVENT_TYPE_KEY = 1,
  AINPUT_EVENT_TYPE_MOTION = 2,
  AINPUT_EVENT_TYPE_FOCUS = 3,
  AINPUT_EVENT_TYPE_CAPTURE = 4,
  AINPUT_EVENT_TYPE_DRAG = 5,
  AINPUT_EVENT_TYPE_TOUCH_MODE = 6
}
enum
Input event types.
Anonymous Enum 35{
  AKEY_EVENT_ACTION_DOWN = 0,
  AKEY_EVENT_ACTION_UP = 1,
  AKEY_EVENT_ACTION_MULTIPLE = 2
}
enum
Key event actions.
Anonymous Enum 36{
  AKEY_EVENT_FLAG_WOKE_HERE = 0x1,
  AKEY_EVENT_FLAG_SOFT_KEYBOARD = 0x2,
  AKEY_EVENT_FLAG_KEEP_TOUCH_MODE = 0x4,
  AKEY_EVENT_FLAG_FROM_SYSTEM = 0x8,
  AKEY_EVENT_FLAG_EDITOR_ACTION = 0x10,
  AKEY_EVENT_FLAG_CANCELED = 0x20,
  AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY = 0x40,
  AKEY_EVENT_FLAG_LONG_PRESS = 0x80,
  AKEY_EVENT_FLAG_CANCELED_LONG_PRESS = 0x100,
  AKEY_EVENT_FLAG_TRACKING = 0x200,
  AKEY_EVENT_FLAG_FALLBACK = 0x400
}
enum
Key event flags.
Anonymous Enum 37{
  AMOTION_EVENT_ACTION_MASK = 0xff,
  AMOTION_EVENT_ACTION_POINTER_INDEX_MASK = 0xff00,
  AMOTION_EVENT_ACTION_DOWN = 0,
  AMOTION_EVENT_ACTION_UP = 1,
  AMOTION_EVENT_ACTION_MOVE = 2,
  AMOTION_EVENT_ACTION_CANCEL = 3,
  AMOTION_EVENT_ACTION_OUTSIDE = 4,
  AMOTION_EVENT_ACTION_POINTER_DOWN = 5,
  AMOTION_EVENT_ACTION_POINTER_UP = 6,
  AMOTION_EVENT_ACTION_HOVER_MOVE = 7,
  AMOTION_EVENT_ACTION_SCROLL = 8,
  AMOTION_EVENT_ACTION_HOVER_ENTER = 9,
  AMOTION_EVENT_ACTION_HOVER_EXIT = 10,
  AMOTION_EVENT_ACTION_BUTTON_PRESS = 11,
  AMOTION_EVENT_ACTION_BUTTON_RELEASE = 12
}
enum
Motion event actions.
Anonymous Enum 38{
  AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED = 0x1
}
enum
Motion event flags.
Anonymous Enum 39{
  AMOTION_EVENT_EDGE_FLAG_NONE = 0,
  AMOTION_EVENT_EDGE_FLAG_TOP = 0x01,
  AMOTION_EVENT_EDGE_FLAG_BOTTOM = 0x02,
  AMOTION_EVENT_EDGE_FLAG_LEFT = 0x04,
  AMOTION_EVENT_EDGE_FLAG_RIGHT = 0x08
}
enum
Motion event edge touch flags.
Anonymous Enum 40{
  AMOTION_EVENT_AXIS_X = 0,
  AMOTION_EVENT_AXIS_Y = 1,
  AMOTION_EVENT_AXIS_PRESSURE = 2,
  AMOTION_EVENT_AXIS_SIZE = 3,
  AMOTION_EVENT_AXIS_TOUCH_MAJOR = 4,
  AMOTION_EVENT_AXIS_TOUCH_MINOR = 5,
  AMOTION_EVENT_AXIS_TOOL_MAJOR = 6,
  AMOTION_EVENT_AXIS_TOOL_MINOR = 7,
  AMOTION_EVENT_AXIS_ORIENTATION = 8,
  AMOTION_EVENT_AXIS_VSCROLL = 9,
  AMOTION_EVENT_AXIS_HSCROLL = 10,
  AMOTION_EVENT_AXIS_Z = 11,
  AMOTION_EVENT_AXIS_RX = 12,
  AMOTION_EVENT_AXIS_RY = 13,
  AMOTION_EVENT_AXIS_RZ = 14,
  AMOTION_EVENT_AXIS_HAT_X = 15,
  AMOTION_EVENT_AXIS_HAT_Y = 16,
  AMOTION_EVENT_AXIS_LTRIGGER = 17,
  AMOTION_EVENT_AXIS_RTRIGGER = 18,
  AMOTION_EVENT_AXIS_THROTTLE = 19,
  AMOTION_EVENT_AXIS_RUDDER = 20,
  AMOTION_EVENT_AXIS_WHEEL = 21,
  AMOTION_EVENT_AXIS_GAS = 22,
  AMOTION_EVENT_AXIS_BRAKE = 23,
  AMOTION_EVENT_AXIS_DISTANCE = 24,
  AMOTION_EVENT_AXIS_TILT = 25,
  AMOTION_EVENT_AXIS_SCROLL = 26,
  AMOTION_EVENT_AXIS_RELATIVE_X = 27,
  AMOTION_EVENT_AXIS_RELATIVE_Y = 28,
  AMOTION_EVENT_AXIS_GENERIC_1 = 32,
  AMOTION_EVENT_AXIS_GENERIC_2 = 33,
  AMOTION_EVENT_AXIS_GENERIC_3 = 34,
  AMOTION_EVENT_AXIS_GENERIC_4 = 35,
  AMOTION_EVENT_AXIS_GENERIC_5 = 36,
  AMOTION_EVENT_AXIS_GENERIC_6 = 37,
  AMOTION_EVENT_AXIS_GENERIC_7 = 38,
  AMOTION_EVENT_AXIS_GENERIC_8 = 39,
  AMOTION_EVENT_AXIS_GENERIC_9 = 40,
  AMOTION_EVENT_AXIS_GENERIC_10 = 41,
  AMOTION_EVENT_AXIS_GENERIC_11 = 42,
  AMOTION_EVENT_AXIS_GENERIC_12 = 43,
  AMOTION_EVENT_AXIS_GENERIC_13 = 44,
  AMOTION_EVENT_AXIS_GENERIC_14 = 45,
  AMOTION_EVENT_AXIS_GENERIC_15 = 46,
  AMOTION_EVENT_AXIS_GENERIC_16 = 47,
  AMOTION_EVENT_AXIS_GESTURE_X_OFFSET = 48,
  AMOTION_EVENT_AXIS_GESTURE_Y_OFFSET = 49,
  AMOTION_EVENT_AXIS_GESTURE_SCROLL_X_DISTANCE = 50,
  AMOTION_EVENT_AXIS_GESTURE_SCROLL_Y_DISTANCE = 51,
  AMOTION_EVENT_AXIS_GESTURE_PINCH_SCALE_FACTOR = 52,
  AMOTION_EVENT_AXIS_GESTURE_SWIPE_FINGER_COUNT = 53,
  AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE = AMOTION_EVENT_AXIS_GESTURE_SWIPE_FINGER_COUNT
}
enum
Constants that identify each individual axis of a motion event.
Anonymous Enum 41{
  AMOTION_EVENT_BUTTON_PRIMARY = 1 << 0,
  AMOTION_EVENT_BUTTON_SECONDARY = 1 << 1,
  AMOTION_EVENT_BUTTON_TERTIARY = 1 << 2,
  AMOTION_EVENT_BUTTON_BACK = 1 << 3,
  AMOTION_EVENT_BUTTON_FORWARD = 1 << 4,
  AMOTION_EVENT_BUTTON_STYLUS_PRIMARY = 1 << 5,
  AMOTION_EVENT_BUTTON_STYLUS_SECONDARY = 1 << 6
}
enum
Constants that identify buttons that are associated with motion events.
Anonymous Enum 42{
  AMOTION_EVENT_TOOL_TYPE_UNKNOWN = 0,
  AMOTION_EVENT_TOOL_TYPE_FINGER = 1,
  AMOTION_EVENT_TOOL_TYPE_STYLUS = 2,
  AMOTION_EVENT_TOOL_TYPE_MOUSE = 3,
  AMOTION_EVENT_TOOL_TYPE_ERASER = 4,
  AMOTION_EVENT_TOOL_TYPE_PALM = 5
}
enum
Constants that identify tool types.
Anonymous Enum 43{
  AINPUT_SOURCE_CLASS_MASK = 0x000000ff,
  AINPUT_SOURCE_CLASS_NONE = 0x00000000,
  AINPUT_SOURCE_CLASS_BUTTON = 0x00000001,
  AINPUT_SOURCE_CLASS_POINTER = 0x00000002,
  AINPUT_SOURCE_CLASS_NAVIGATION = 0x00000004,
  AINPUT_SOURCE_CLASS_POSITION = 0x00000008,
  AINPUT_SOURCE_CLASS_JOYSTICK = 0x00000010
}
enum
Input source masks.
Anonymous Enum 44{
  AINPUT_SOURCE_UNKNOWN = 0x00000000,
  AINPUT_SOURCE_KEYBOARD = 0x00000100 | AINPUT_SOURCE_CLASS_BUTTON,
  AINPUT_SOURCE_DPAD = 0x00000200 | AINPUT_SOURCE_CLASS_BUTTON,
  AINPUT_SOURCE_GAMEPAD = 0x00000400 | AINPUT_SOURCE_CLASS_BUTTON,
  AINPUT_SOURCE_TOUCHSCREEN = 0x00001000 | AINPUT_SOURCE_CLASS_POINTER,
  AINPUT_SOURCE_MOUSE = 0x00002000 | AINPUT_SOURCE_CLASS_POINTER,
  AINPUT_SOURCE_STYLUS = 0x00004000 | AINPUT_SOURCE_CLASS_POINTER,
  AINPUT_SOURCE_BLUETOOTH_STYLUS = 0x00008000 | AINPUT_SOURCE_STYLUS,
  AINPUT_SOURCE_TRACKBALL = 0x00010000 | AINPUT_SOURCE_CLASS_NAVIGATION,
  AINPUT_SOURCE_MOUSE_RELATIVE = 0x00020000 | AINPUT_SOURCE_CLASS_NAVIGATION,
  AINPUT_SOURCE_TOUCHPAD = 0x00100000 | AINPUT_SOURCE_CLASS_POSITION,
  AINPUT_SOURCE_TOUCH_NAVIGATION = 0x00200000 | AINPUT_SOURCE_CLASS_NONE,
  AINPUT_SOURCE_JOYSTICK = 0x01000000 | AINPUT_SOURCE_CLASS_JOYSTICK,
  AINPUT_SOURCE_HDMI = 0x02000000 | AINPUT_SOURCE_CLASS_BUTTON,
  AINPUT_SOURCE_SENSOR = 0x04000000 | AINPUT_SOURCE_CLASS_NONE,
  AINPUT_SOURCE_ROTARY_ENCODER = 0x00400000 | AINPUT_SOURCE_CLASS_NONE,
  AINPUT_SOURCE_ANY = 0xffffff00
}
enum
Input sources.
Anonymous Enum 45{
  AINPUT_KEYBOARD_TYPE_NONE = 0,
  AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC = 1,
  AINPUT_KEYBOARD_TYPE_ALPHABETIC = 2
}
enum
Keyboard types.
Anonymous Enum 46{
  AINPUT_MOTION_RANGE_X = AMOTION_EVENT_AXIS_X,
  AINPUT_MOTION_RANGE_Y = AMOTION_EVENT_AXIS_Y,
  AINPUT_MOTION_RANGE_PRESSURE = AMOTION_EVENT_AXIS_PRESSURE,
  AINPUT_MOTION_RANGE_SIZE = AMOTION_EVENT_AXIS_SIZE,
  AINPUT_MOTION_RANGE_TOUCH_MAJOR = AMOTION_EVENT_AXIS_TOUCH_MAJOR,
  AINPUT_MOTION_RANGE_TOUCH_MINOR = AMOTION_EVENT_AXIS_TOUCH_MINOR,
  AINPUT_MOTION_RANGE_TOOL_MAJOR = AMOTION_EVENT_AXIS_TOOL_MAJOR,
  AINPUT_MOTION_RANGE_TOOL_MINOR = AMOTION_EVENT_AXIS_TOOL_MINOR,
  AINPUT_MOTION_RANGE_ORIENTATION = AMOTION_EVENT_AXIS_ORIENTATION
}
enum
Constants used to retrieve information about the range of motion for a particular coordinate of a motion event.
Anonymous Enum 47{
  AKEYCODE_UNKNOWN = 0,
  AKEYCODE_SOFT_LEFT = 1,
  AKEYCODE_SOFT_RIGHT = 2,
  AKEYCODE_HOME = 3,
  AKEYCODE_BACK = 4,
  AKEYCODE_CALL = 5,
  AKEYCODE_ENDCALL = 6,
  AKEYCODE_0 = 7,
  AKEYCODE_1 = 8,
  AKEYCODE_2 = 9,
  AKEYCODE_3 = 10,
  AKEYCODE_4 = 11,
  AKEYCODE_5 = 12,
  AKEYCODE_6 = 13,
  AKEYCODE_7 = 14,
  AKEYCODE_8 = 15,
  AKEYCODE_9 = 16,
  AKEYCODE_STAR = 17,
  AKEYCODE_POUND = 18,
  AKEYCODE_DPAD_UP = 19,
  AKEYCODE_DPAD_DOWN = 20,
  AKEYCODE_DPAD_LEFT = 21,
  AKEYCODE_DPAD_RIGHT = 22,
  AKEYCODE_DPAD_CENTER = 23,
  AKEYCODE_VOLUME_UP = 24,
  AKEYCODE_VOLUME_DOWN = 25,
  AKEYCODE_POWER = 26,
  AKEYCODE_CAMERA = 27,
  AKEYCODE_CLEAR = 28,
  AKEYCODE_A = 29,
  AKEYCODE_B = 30,
  AKEYCODE_C = 31,
  AKEYCODE_D = 32,
  AKEYCODE_E = 33,
  AKEYCODE_F = 34,
  AKEYCODE_G = 35,
  AKEYCODE_H = 36,
  AKEYCODE_I = 37,
  AKEYCODE_J = 38,
  AKEYCODE_K = 39,
  AKEYCODE_L = 40,
  AKEYCODE_M = 41,
  AKEYCODE_N = 42,
  AKEYCODE_O = 43,
  AKEYCODE_P = 44,
  AKEYCODE_Q = 45,
  AKEYCODE_R = 46,
  AKEYCODE_S = 47,
  AKEYCODE_T = 48,
  AKEYCODE_U = 49,
  AKEYCODE_V = 50,
  AKEYCODE_W = 51,
  AKEYCODE_X = 52,
  AKEYCODE_Y = 53,
  AKEYCODE_Z = 54,
  AKEYCODE_COMMA = 55,
  AKEYCODE_PERIOD = 56,
  AKEYCODE_ALT_LEFT = 57,
  AKEYCODE_ALT_RIGHT = 58,
  AKEYCODE_SHIFT_LEFT = 59,
  AKEYCODE_SHIFT_RIGHT = 60,
  AKEYCODE_TAB = 61,
  AKEYCODE_SPACE = 62,
  AKEYCODE_SYM = 63,
  AKEYCODE_EXPLORER = 64,
  AKEYCODE_ENVELOPE = 65,
  AKEYCODE_ENTER = 66,
  AKEYCODE_DEL = 67,
  AKEYCODE_GRAVE = 68,
  AKEYCODE_MINUS = 69,
  AKEYCODE_EQUALS = 70,
  AKEYCODE_LEFT_BRACKET = 71,
  AKEYCODE_RIGHT_BRACKET = 72,
  AKEYCODE_BACKSLASH = 73,
  AKEYCODE_SEMICOLON = 74,
  AKEYCODE_APOSTROPHE = 75,
  AKEYCODE_SLASH = 76,
  AKEYCODE_AT = 77,
  AKEYCODE_NUM = 78,
  AKEYCODE_HEADSETHOOK = 79,
  AKEYCODE_FOCUS = 80,
  AKEYCODE_PLUS = 81,
  AKEYCODE_MENU = 82,
  AKEYCODE_NOTIFICATION = 83,
  AKEYCODE_SEARCH = 84,
  AKEYCODE_MEDIA_PLAY_PAUSE = 85,
  AKEYCODE_MEDIA_STOP = 86,
  AKEYCODE_MEDIA_NEXT = 87,
  AKEYCODE_MEDIA_PREVIOUS = 88,
  AKEYCODE_MEDIA_REWIND = 89,
  AKEYCODE_MEDIA_FAST_FORWARD = 90,
  AKEYCODE_MUTE = 91,
  AKEYCODE_PAGE_UP = 92,
  AKEYCODE_PAGE_DOWN = 93,
  AKEYCODE_PICTSYMBOLS = 94,
  AKEYCODE_SWITCH_CHARSET = 95,
  AKEYCODE_BUTTON_A = 96,
  AKEYCODE_BUTTON_B = 97,
  AKEYCODE_BUTTON_C = 98,
  AKEYCODE_BUTTON_X = 99,
  AKEYCODE_BUTTON_Y = 100,
  AKEYCODE_BUTTON_Z = 101,
  AKEYCODE_BUTTON_L1 = 102,
  AKEYCODE_BUTTON_R1 = 103,
  AKEYCODE_BUTTON_L2 = 104,
  AKEYCODE_BUTTON_R2 = 105,
  AKEYCODE_BUTTON_THUMBL = 106,
  AKEYCODE_BUTTON_THUMBR = 107,
  AKEYCODE_BUTTON_START = 108,
  AKEYCODE_BUTTON_SELECT = 109,
  AKEYCODE_BUTTON_MODE = 110,
  AKEYCODE_ESCAPE = 111,
  AKEYCODE_FORWARD_DEL = 112,
  AKEYCODE_CTRL_LEFT = 113,
  AKEYCODE_CTRL_RIGHT = 114,
  AKEYCODE_CAPS_LOCK = 115,
  AKEYCODE_SCROLL_LOCK = 116,
  AKEYCODE_META_LEFT = 117,
  AKEYCODE_META_RIGHT = 118,
  AKEYCODE_FUNCTION = 119,
  AKEYCODE_SYSRQ = 120,
  AKEYCODE_BREAK = 121,
  AKEYCODE_MOVE_HOME = 122,
  AKEYCODE_MOVE_END = 123,
  AKEYCODE_INSERT = 124,
  AKEYCODE_FORWARD = 125,
  AKEYCODE_MEDIA_PLAY = 126,
  AKEYCODE_MEDIA_PAUSE = 127,
  AKEYCODE_MEDIA_CLOSE = 128,
  AKEYCODE_MEDIA_EJECT = 129,
  AKEYCODE_MEDIA_RECORD = 130,
  AKEYCODE_F1 = 131,
  AKEYCODE_F2 = 132,
  AKEYCODE_F3 = 133,
  AKEYCODE_F4 = 134,
  AKEYCODE_F5 = 135,
  AKEYCODE_F6 = 136,
  AKEYCODE_F7 = 137,
  AKEYCODE_F8 = 138,
  AKEYCODE_F9 = 139,
  AKEYCODE_F10 = 140,
  AKEYCODE_F11 = 141,
  AKEYCODE_F12 = 142,
  AKEYCODE_NUM_LOCK = 143,
  AKEYCODE_NUMPAD_0 = 144,
  AKEYCODE_NUMPAD_1 = 145,
  AKEYCODE_NUMPAD_2 = 146,
  AKEYCODE_NUMPAD_3 = 147,
  AKEYCODE_NUMPAD_4 = 148,
  AKEYCODE_NUMPAD_5 = 149,
  AKEYCODE_NUMPAD_6 = 150,
  AKEYCODE_NUMPAD_7 = 151,
  AKEYCODE_NUMPAD_8 = 152,
  AKEYCODE_NUMPAD_9 = 153,
  AKEYCODE_NUMPAD_DIVIDE = 154,
  AKEYCODE_NUMPAD_MULTIPLY = 155,
  AKEYCODE_NUMPAD_SUBTRACT = 156,
  AKEYCODE_NUMPAD_ADD = 157,
  AKEYCODE_NUMPAD_DOT = 158,
  AKEYCODE_NUMPAD_COMMA = 159,
  AKEYCODE_NUMPAD_ENTER = 160,
  AKEYCODE_NUMPAD_EQUALS = 161,
  AKEYCODE_NUMPAD_LEFT_PAREN = 162,
  AKEYCODE_NUMPAD_RIGHT_PAREN = 163,
  AKEYCODE_VOLUME_MUTE = 164,
  AKEYCODE_INFO = 165,
  AKEYCODE_CHANNEL_UP = 166,
  AKEYCODE_CHANNEL_DOWN = 167,
  AKEYCODE_ZOOM_IN = 168,
  AKEYCODE_ZOOM_OUT = 169,
  AKEYCODE_TV = 170,
  AKEYCODE_WINDOW = 171,
  AKEYCODE_GUIDE = 172,
  AKEYCODE_DVR = 173,
  AKEYCODE_BOOKMARK = 174,
  AKEYCODE_CAPTIONS = 175,
  AKEYCODE_SETTINGS = 176,
  AKEYCODE_TV_POWER = 177,
  AKEYCODE_TV_INPUT = 178,
  AKEYCODE_STB_POWER = 179,
  AKEYCODE_STB_INPUT = 180,
  AKEYCODE_AVR_POWER = 181,
  AKEYCODE_AVR_INPUT = 182,
  AKEYCODE_PROG_RED = 183,
  AKEYCODE_PROG_GREEN = 184,
  AKEYCODE_PROG_YELLOW = 185,
  AKEYCODE_PROG_BLUE = 186,
  AKEYCODE_APP_SWITCH = 187,
  AKEYCODE_BUTTON_1 = 188,
  AKEYCODE_BUTTON_2 = 189,
  AKEYCODE_BUTTON_3 = 190,
  AKEYCODE_BUTTON_4 = 191,
  AKEYCODE_BUTTON_5 = 192,
  AKEYCODE_BUTTON_6 = 193,
  AKEYCODE_BUTTON_7 = 194,
  AKEYCODE_BUTTON_8 = 195,
  AKEYCODE_BUTTON_9 = 196,
  AKEYCODE_BUTTON_10 = 197,
  AKEYCODE_BUTTON_11 = 198,
  AKEYCODE_BUTTON_12 = 199,
  AKEYCODE_BUTTON_13 = 200,
  AKEYCODE_BUTTON_14 = 201,
  AKEYCODE_BUTTON_15 = 202,
  AKEYCODE_BUTTON_16 = 203,
  AKEYCODE_LANGUAGE_SWITCH = 204,
  AKEYCODE_MANNER_MODE = 205,
  AKEYCODE_3D_MODE = 206,
  AKEYCODE_CONTACTS = 207,
  AKEYCODE_CALENDAR = 208,
  AKEYCODE_MUSIC = 209,
  AKEYCODE_CALCULATOR = 210,
  AKEYCODE_ZENKAKU_HANKAKU = 211,
  AKEYCODE_EISU = 212,
  AKEYCODE_MUHENKAN = 213,
  AKEYCODE_HENKAN = 214,
  AKEYCODE_KATAKANA_HIRAGANA = 215,
  AKEYCODE_YEN = 216,
  AKEYCODE_RO = 217,
  AKEYCODE_KANA = 218,
  AKEYCODE_ASSIST = 219,
  AKEYCODE_BRIGHTNESS_DOWN = 220,
  AKEYCODE_BRIGHTNESS_UP = 221,
  AKEYCODE_MEDIA_AUDIO_TRACK = 222,
  AKEYCODE_SLEEP = 223,
  AKEYCODE_WAKEUP = 224,
  AKEYCODE_PAIRING = 225,
  AKEYCODE_MEDIA_TOP_MENU = 226,
  AKEYCODE_11 = 227,
  AKEYCODE_12 = 228,
  AKEYCODE_LAST_CHANNEL = 229,
  AKEYCODE_TV_DATA_SERVICE = 230,
  AKEYCODE_VOICE_ASSIST = 231,
  AKEYCODE_TV_RADIO_SERVICE = 232,
  AKEYCODE_TV_TELETEXT = 233,
  AKEYCODE_TV_NUMBER_ENTRY = 234,
  AKEYCODE_TV_TERRESTRIAL_ANALOG = 235,
  AKEYCODE_TV_TERRESTRIAL_DIGITAL = 236,
  AKEYCODE_TV_SATELLITE = 237,
  AKEYCODE_TV_SATELLITE_BS = 238,
  AKEYCODE_TV_SATELLITE_CS = 239,
  AKEYCODE_TV_SATELLITE_SERVICE = 240,
  AKEYCODE_TV_NETWORK = 241,
  AKEYCODE_TV_ANTENNA_CABLE = 242,
  AKEYCODE_TV_INPUT_HDMI_1 = 243,
  AKEYCODE_TV_INPUT_HDMI_2 = 244,
  AKEYCODE_TV_INPUT_HDMI_3 = 245,
  AKEYCODE_TV_INPUT_HDMI_4 = 246,
  AKEYCODE_TV_INPUT_COMPOSITE_1 = 247,
  AKEYCODE_TV_INPUT_COMPOSITE_2 = 248,
  AKEYCODE_TV_INPUT_COMPONENT_1 = 249,
  AKEYCODE_TV_INPUT_COMPONENT_2 = 250,
  AKEYCODE_TV_INPUT_VGA_1 = 251,
  AKEYCODE_TV_AUDIO_DESCRIPTION = 252,
  AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP = 253,
  AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN = 254,
  AKEYCODE_TV_ZOOM_MODE = 255,
  AKEYCODE_TV_CONTENTS_MENU = 256,
  AKEYCODE_TV_MEDIA_CONTEXT_MENU = 257,
  AKEYCODE_TV_TIMER_PROGRAMMING = 258,
  AKEYCODE_HELP = 259,
  AKEYCODE_NAVIGATE_PREVIOUS = 260,
  AKEYCODE_NAVIGATE_NEXT = 261,
  AKEYCODE_NAVIGATE_IN = 262,
  AKEYCODE_NAVIGATE_OUT = 263,
  AKEYCODE_STEM_PRIMARY = 264,
  AKEYCODE_STEM_1 = 265,
  AKEYCODE_STEM_2 = 266,
  AKEYCODE_STEM_3 = 267,
  AKEYCODE_DPAD_UP_LEFT = 268,
  AKEYCODE_DPAD_DOWN_LEFT = 269,
  AKEYCODE_DPAD_UP_RIGHT = 270,
  AKEYCODE_DPAD_DOWN_RIGHT = 271,
  AKEYCODE_MEDIA_SKIP_FORWARD = 272,
  AKEYCODE_MEDIA_SKIP_BACKWARD = 273,
  AKEYCODE_MEDIA_STEP_FORWARD = 274,
  AKEYCODE_MEDIA_STEP_BACKWARD = 275,
  AKEYCODE_SOFT_SLEEP = 276,
  AKEYCODE_CUT = 277,
  AKEYCODE_COPY = 278,
  AKEYCODE_PASTE = 279,
  AKEYCODE_SYSTEM_NAVIGATION_UP = 280,
  AKEYCODE_SYSTEM_NAVIGATION_DOWN = 281,
  AKEYCODE_SYSTEM_NAVIGATION_LEFT = 282,
  AKEYCODE_SYSTEM_NAVIGATION_RIGHT = 283,
  AKEYCODE_ALL_APPS = 284,
  AKEYCODE_REFRESH = 285,
  AKEYCODE_THUMBS_UP = 286,
  AKEYCODE_THUMBS_DOWN = 287,
  AKEYCODE_PROFILE_SWITCH = 288,
  AKEYCODE_VIDEO_APP_1 = 289,
  AKEYCODE_VIDEO_APP_2 = 290,
  AKEYCODE_VIDEO_APP_3 = 291,
  AKEYCODE_VIDEO_APP_4 = 292,
  AKEYCODE_VIDEO_APP_5 = 293,
  AKEYCODE_VIDEO_APP_6 = 294,
  AKEYCODE_VIDEO_APP_7 = 295,
  AKEYCODE_VIDEO_APP_8 = 296,
  AKEYCODE_FEATURED_APP_1 = 297,
  AKEYCODE_FEATURED_APP_2 = 298,
  AKEYCODE_FEATURED_APP_3 = 299,
  AKEYCODE_FEATURED_APP_4 = 300,
  AKEYCODE_DEMO_APP_1 = 301,
  AKEYCODE_DEMO_APP_2 = 302,
  AKEYCODE_DEMO_APP_3 = 303,
  AKEYCODE_DEMO_APP_4 = 304,
  AKEYCODE_KEYBOARD_BACKLIGHT_DOWN = 305,
  AKEYCODE_KEYBOARD_BACKLIGHT_UP = 306,
  AKEYCODE_KEYBOARD_BACKLIGHT_TOGGLE = 307,
  AKEYCODE_STYLUS_BUTTON_PRIMARY = 308,
  AKEYCODE_STYLUS_BUTTON_SECONDARY = 309,
  AKEYCODE_STYLUS_BUTTON_TERTIARY = 310,
  AKEYCODE_STYLUS_BUTTON_TAIL = 311,
  AKEYCODE_RECENT_APPS = 312,
  AKEYCODE_MACRO_1 = 313,
  AKEYCODE_MACRO_2 = 314,
  AKEYCODE_MACRO_3 = 315,
  AKEYCODE_MACRO_4 = 316,
  AKEYCODE_EMOJI_PICKER = 317,
  AKEYCODE_SCREENSHOT = 318
}
enum
Key codes.
AMotionClassification{
  AMOTION_EVENT_CLASSIFICATION_NONE = 0,
  AMOTION_EVENT_CLASSIFICATION_AMBIGUOUS_GESTURE = 1,
  AMOTION_EVENT_CLASSIFICATION_DEEP_PRESS = 2,
  AMOTION_EVENT_CLASSIFICATION_TWO_FINGER_SWIPE = 3,
  AMOTION_EVENT_CLASSIFICATION_MULTI_FINGER_SWIPE = 4,
  AMOTION_EVENT_CLASSIFICATION_PINCH = 5
}
enum
Constants that identify different gesture classification types.

Typedefs

AInputEvent typedef
struct AInputEvent
Input events.
AInputQueue typedef
struct AInputQueue
Input queue.

Functions

AInputEvent_getDeviceId(const AInputEvent *event)
int32_t
Get the id for the device that an input event came from.
AInputEvent_getSource(const AInputEvent *event)
int32_t
Get the input event source.
AInputEvent_getType(const AInputEvent *event)
int32_t
Input event accessors.
AInputEvent_release(const AInputEvent *event)
void
Releases interface objects created by AKeyEvent_fromJava() and AMotionEvent_fromJava().
AInputEvent_toJava(JNIEnv *env, const AInputEvent *aInputEvent)
jobject
Creates a java android.view.InputEvent object that is a copy of the specified native AInputEvent.
AInputQueue_attachLooper(AInputQueue *queue, ALooper *looper, int ident, ALooper_callbackFunc callback, void *data)
void
Add this input queue to a looper for processing.
AInputQueue_detachLooper(AInputQueue *queue)
void
Remove the input queue from the looper it is currently attached to.
AInputQueue_finishEvent(AInputQueue *queue, AInputEvent *event, int handled)
void
Report that dispatching has finished with the given event.
AInputQueue_fromJava(JNIEnv *env, jobject inputQueue)
Returns the AInputQueue* object associated with the supplied Java InputQueue object.
AInputQueue_getEvent(AInputQueue *queue, AInputEvent **outEvent)
int32_t
Returns the next available event from the queue.
AInputQueue_hasEvents(AInputQueue *queue)
int32_t
Returns true if there are one or more events available in the input queue.
AInputQueue_preDispatchEvent(AInputQueue *queue, AInputEvent *event)
int32_t
Sends the key for standard pre-dispatching that is, possibly deliver it to the current IME to be consumed before the app.
AKeyEvent_fromJava(JNIEnv *env, jobject keyEvent)
const AInputEvent *
Creates a native AInputEvent* object that is a copy of the specified Java android.view.KeyEvent.
AKeyEvent_getAction(const AInputEvent *key_event)
int32_t
Get the key event action.
AKeyEvent_getDownTime(const AInputEvent *key_event)
int64_t
Get the time of the most recent key down event, in the java.lang.System.nanoTime() time base.
AKeyEvent_getEventTime(const AInputEvent *key_event)
int64_t
Get the time this event occurred, in the java.lang.System.nanoTime() time base.
AKeyEvent_getFlags(const AInputEvent *key_event)
int32_t
Get the key event flags.
AKeyEvent_getKeyCode(const AInputEvent *key_event)
int32_t
Get the key code of the key event.
AKeyEvent_getMetaState(const AInputEvent *key_event)
int32_t
Get the meta key state.
AKeyEvent_getRepeatCount(const AInputEvent *key_event)
int32_t
Get the repeat count of the event.
AKeyEvent_getScanCode(const AInputEvent *key_event)
int32_t
Get the hardware key id of this key event.
AMotionEvent_fromJava(JNIEnv *env, jobject motionEvent)
const AInputEvent *
Creates a native AInputEvent* object that is a copy of the specified Java android.view.MotionEvent.
AMotionEvent_getAction(const AInputEvent *motion_event)
int32_t
Get the combined motion event action code and pointer index.
AMotionEvent_getActionButton(const AInputEvent *motion_event)
int32_t
Get the action button for the motion event.
AMotionEvent_getAxisValue(const AInputEvent *motion_event, int32_t axis, size_t pointer_index)
float
Get the value of the request axis for the given pointer index.
AMotionEvent_getButtonState(const AInputEvent *motion_event)
int32_t
Get the button state of all buttons that are pressed.
AMotionEvent_getClassification(const AInputEvent *motion_event)
int32_t
Returns the classification for the current gesture.
AMotionEvent_getDownTime(const AInputEvent *motion_event)
int64_t
Get the time when the user originally pressed down to start a stream of position events, in the java.lang.System.nanoTime() time base.
AMotionEvent_getEdgeFlags(const AInputEvent *motion_event)
int32_t
Get a bitfield indicating which edges, if any, were touched by this motion event.
AMotionEvent_getEventTime(const AInputEvent *motion_event)
int64_t
Get the time when this specific event was generated, in the java.lang.System.nanoTime() time base.
AMotionEvent_getFlags(const AInputEvent *motion_event)
int32_t
Get the motion event flags.
AMotionEvent_getHistoricalAxisValue(const AInputEvent *motion_event, int32_t axis, size_t pointer_index, size_t history_index)
float
Get the historical value of the request axis for the given pointer index that occurred between this event and the previous motion event.
AMotionEvent_getHistoricalEventTime(const AInputEvent *motion_event, size_t history_index)
int64_t
Get the time that a historical movement occurred between this event and the previous event, in the java.lang.System.nanoTime() time base.
AMotionEvent_getHistoricalOrientation(const AInputEvent *motion_event, size_t pointer_index, size_t history_index)
float
Get the historical orientation of the touch area and tool area in radians clockwise from vertical for the given pointer index that occurred between this event and the previous motion event.
AMotionEvent_getHistoricalPressure(const AInputEvent *motion_event, size_t pointer_index, size_t history_index)
float
Get the historical pressure of this event for the given pointer index that occurred between this event and the previous motion event.
AMotionEvent_getHistoricalRawX(const AInputEvent *motion_event, size_t pointer_index, size_t history_index)
float
Get the historical raw X coordinate of this event for the given pointer index that occurred between this event and the previous motion event.
AMotionEvent_getHistoricalRawY(const AInputEvent *motion_event, size_t pointer_index, size_t history_index)
float
Get the historical raw Y coordinate of this event for the given pointer index that occurred between this event and the previous motion event.
AMotionEvent_getHistoricalSize(const AInputEvent *motion_event, size_t pointer_index, size_t history_index)
float
Get the current scaled value of the approximate size for the given pointer index that occurred between this event and the previous motion event.
AMotionEvent_getHistoricalToolMajor(const AInputEvent *motion_event, size_t pointer_index, size_t history_index)
float
Get the historical length of the major axis of an ellipse that describes the size of the approaching tool for the given pointer index that occurred between this event and the previous motion event.
AMotionEvent_getHistoricalToolMinor(const AInputEvent *motion_event, size_t pointer_index, size_t history_index)
float
Get the historical length of the minor axis of an ellipse that describes the size of the approaching tool for the given pointer index that occurred between this event and the previous motion event.
AMotionEvent_getHistoricalTouchMajor(const AInputEvent *motion_event, size_t pointer_index, size_t history_index)
float
Get the historical length of the major axis of an ellipse that describes the touch area at the point of contact for the given pointer index that occurred between this event and the previous motion event.
AMotionEvent_getHistoricalTouchMinor(const AInputEvent *motion_event, size_t pointer_index, size_t history_index)
float
Get the historical length of the minor axis of an ellipse that describes the touch area at the point of contact for the given pointer index that occurred between this event and the previous motion event.
AMotionEvent_getHistoricalX(const AInputEvent *motion_event, size_t pointer_index, size_t history_index)
float
Get the historical X coordinate of this event for the given pointer index that occurred between this event and the previous motion event.
AMotionEvent_getHistoricalY(const AInputEvent *motion_event, size_t pointer_index, size_t history_index)
float
Get the historical Y coordinate of this event for the given pointer index that occurred between this event and the previous motion event.
AMotionEvent_getHistorySize(const AInputEvent *motion_event)
size_t
Get the number of historical points in this event.
AMotionEvent_getMetaState(const AInputEvent *motion_event)
int32_t
Get the state of any meta / modifier keys that were in effect when the event was generated.
AMotionEvent_getOrientation(const AInputEvent *motion_event, size_t pointer_index)
float
Get the current orientation of the touch area and tool area in radians clockwise from vertical for the given pointer index.
AMotionEvent_getPointerCount(const AInputEvent *motion_event)
size_t
Get the number of pointers of data contained in this event.
AMotionEvent_getPointerId(const AInputEvent *motion_event, size_t pointer_index)
int32_t
Get the pointer identifier associated with a particular pointer data index in this event.
AMotionEvent_getPressure(const AInputEvent *motion_event, size_t pointer_index)
float
Get the current pressure of this event for the given pointer index.
AMotionEvent_getRawX(const AInputEvent *motion_event, size_t pointer_index)
float
Get the original raw X coordinate of this event.
AMotionEvent_getRawY(const AInputEvent *motion_event, size_t pointer_index)
float
Get the original raw X coordinate of this event.
AMotionEvent_getSize(const AInputEvent *motion_event, size_t pointer_index)
float
Get the current scaled value of the approximate size for the given pointer index.
AMotionEvent_getToolMajor(const AInputEvent *motion_event, size_t pointer_index)
float
Get the current length of the major axis of an ellipse that describes the size of the approaching tool for the given pointer index.
AMotionEvent_getToolMinor(const AInputEvent *motion_event, size_t pointer_index)
float
Get the current length of the minor axis of an ellipse that describes the size of the approaching tool for the given pointer index.
AMotionEvent_getToolType(const AInputEvent *motion_event, size_t pointer_index)
int32_t
Get the tool type of a pointer for the given pointer index.
AMotionEvent_getTouchMajor(const AInputEvent *motion_event, size_t pointer_index)
float
Get the current length of the major axis of an ellipse that describes the touch area at the point of contact for the given pointer index.
AMotionEvent_getTouchMinor(const AInputEvent *motion_event, size_t pointer_index)
float
Get the current length of the minor axis of an ellipse that describes the touch area at the point of contact for the given pointer index.
AMotionEvent_getX(const AInputEvent *motion_event, size_t pointer_index)
float
Get the current X coordinate of this event for the given pointer index.
AMotionEvent_getXOffset(const AInputEvent *motion_event)
float
Get the X coordinate offset.
AMotionEvent_getXPrecision(const AInputEvent *motion_event)
float
Get the precision of the X coordinates being reported.
AMotionEvent_getY(const AInputEvent *motion_event, size_t pointer_index)
float
Get the current Y coordinate of this event for the given pointer index.
AMotionEvent_getYOffset(const AInputEvent *motion_event)
float
Get the Y coordinate offset.
AMotionEvent_getYPrecision(const AInputEvent *motion_event)
float
Get the precision of the Y coordinates being reported.

Enumerations

Anonymous Enum 32

Declared in android/input.h
 Anonymous Enum 32

Key states (may be returned by queries about the current state of a particular key code, scan code or switch).

Properties
AKEY_STATE_DOWN

The key is down.

AKEY_STATE_UNKNOWN

The key state is unknown or the requested key itself is not supported.

AKEY_STATE_UP

The key is up.

AKEY_STATE_VIRTUAL

The key is down but is a virtual key press that is being emulated by the system.

Anonymous Enum 33

Declared in android/input.h
 Anonymous Enum 33

Meta key / modifier state.

Properties
AMETA_ALT_LEFT_ON

This mask is used to check whether the left ALT meta key is pressed.

AMETA_ALT_ON

This mask is used to check whether one of the ALT meta keys is pressed.

AMETA_ALT_RIGHT_ON

This mask is used to check whether the right ALT meta key is pressed.

AMETA_CAPS_LOCK_ON

This mask is used to check whether the CAPS LOCK meta key is on.

AMETA_CTRL_LEFT_ON

This mask is used to check whether the left CTRL meta key is pressed.

AMETA_CTRL_ON

This mask is used to check whether one of the CTRL meta keys is pressed.

AMETA_CTRL_RIGHT_ON

This mask is used to check whether the right CTRL meta key is pressed.

AMETA_FUNCTION_ON

This mask is used to check whether the FUNCTION meta key is pressed.

AMETA_META_LEFT_ON

This mask is used to check whether the left META meta key is pressed.

AMETA_META_ON

This mask is used to check whether one of the META meta keys is pressed.

AMETA_META_RIGHT_ON

This mask is used to check whether the right META meta key is pressed.

AMETA_NONE

No meta keys are pressed.

AMETA_NUM_LOCK_ON

This mask is used to check whether the NUM LOCK meta key is on.

AMETA_SCROLL_LOCK_ON

This mask is used to check whether the SCROLL LOCK meta key is on.

AMETA_SHIFT_LEFT_ON

This mask is used to check whether the left SHIFT meta key is pressed.

AMETA_SHIFT_ON

This mask is used to check whether one of the SHIFT meta keys is pressed.

AMETA_SHIFT_RIGHT_ON

This mask is used to check whether the right SHIFT meta key is pressed.

AMETA_SYM_ON

This mask is used to check whether the SYM meta key is pressed.

Anonymous Enum 34

Declared in android/input.h
 Anonymous Enum 34

Input event types.

Properties
AINPUT_EVENT_TYPE_CAPTURE

Capture event.

AINPUT_EVENT_TYPE_DRAG

Drag event.

AINPUT_EVENT_TYPE_FOCUS

Focus event.

AINPUT_EVENT_TYPE_KEY

Indicates that the input event is a key event.

AINPUT_EVENT_TYPE_MOTION

Indicates that the input event is a motion event.

AINPUT_EVENT_TYPE_TOUCH_MODE

TouchMode event.

Anonymous Enum 35

Declared in android/input.h
 Anonymous Enum 35

Key event actions.

Properties
AKEY_EVENT_ACTION_DOWN

The key has been pressed down.

AKEY_EVENT_ACTION_MULTIPLE

Multiple duplicate key events have occurred in a row, or a complex string is being delivered.

The repeat_count property of the key event contains the number of times the given key code should be executed.

AKEY_EVENT_ACTION_UP

The key has been released.

Anonymous Enum 36

Declared in android/input.h
 Anonymous Enum 36

Key event flags.

Properties
AKEY_EVENT_FLAG_CANCELED

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

Typically this is used with virtual touch screen keys, where the user can slide from the virtual key area on to the display: in that case, the application will receive a canceled up event and should not perform the action normally associated with the key. Note that for this to work, the application can not perform an action for a key until it receives an up or the long press timeout has expired.

AKEY_EVENT_FLAG_CANCELED_LONG_PRESS

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

AKEY_EVENT_FLAG_EDITOR_ACTION

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".

This allows TextView to dispatch these as normal enter keys for old applications, but still do the appropriate action when receiving them.

AKEY_EVENT_FLAG_FALLBACK

Set when a key event has been synthesized to implement default behavior for an event that the application did not handle.

Fallback key events are generated by unhandled trackball motions (to emulate a directional keypad) and by certain unhandled key presses that are declared in the key map (such as special function numeric keypad keys when numlock is off).

AKEY_EVENT_FLAG_FROM_SYSTEM

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

That is, the event is known to come from the user, and could not have been spoofed by a third party component.

AKEY_EVENT_FLAG_KEEP_TOUCH_MODE

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

AKEY_EVENT_FLAG_LONG_PRESS

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

AKEY_EVENT_FLAG_SOFT_KEYBOARD

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

AKEY_EVENT_FLAG_TRACKING

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

That is, somebody requested that tracking started on the key down and a long press has not caused the tracking to be canceled.

AKEY_EVENT_FLAG_VIRTUAL_HARD_KEY

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.

AKEY_EVENT_FLAG_WOKE_HERE

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

Anonymous Enum 37

Declared in android/input.h
 Anonymous Enum 37

Motion event actions.

Properties
AMOTION_EVENT_ACTION_BUTTON_PRESS
AMOTION_EVENT_ACTION_BUTTON_RELEASE
AMOTION_EVENT_ACTION_CANCEL

The current gesture has been aborted.

You will not receive any more points in it. You should treat this as an up event, but not perform any action that you normally would.

AMOTION_EVENT_ACTION_DOWN

A pressed gesture has started, the motion contains the initial starting location.

AMOTION_EVENT_ACTION_HOVER_ENTER

The pointer is not down but has entered the boundaries of a window or view.

AMOTION_EVENT_ACTION_HOVER_EXIT

The pointer is not down but has exited the boundaries of a window or view.

AMOTION_EVENT_ACTION_HOVER_MOVE

A change happened but the pointer is not down (unlike AMOTION_EVENT_ACTION_MOVE).

The motion contains the most recent point, as well as any intermediate points since the last hover move event.

AMOTION_EVENT_ACTION_MASK

Bit mask of the parts of the action code that are the action itself.

AMOTION_EVENT_ACTION_MOVE

A change has happened during a press gesture (between AMOTION_EVENT_ACTION_DOWN and AMOTION_EVENT_ACTION_UP).

The motion contains the most recent point, as well as any intermediate points since the last down or move event.

AMOTION_EVENT_ACTION_OUTSIDE

A movement has happened outside of the normal bounds of the UI element.

This does not provide a full gesture, but only the initial location of the movement/touch.

AMOTION_EVENT_ACTION_POINTER_DOWN

A non-primary pointer has gone down.

The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed.

AMOTION_EVENT_ACTION_POINTER_INDEX_MASK

Bits in the action code that represent a pointer index, used with AMOTION_EVENT_ACTION_POINTER_DOWN and AMOTION_EVENT_ACTION_POINTER_UP.

Shifting down by AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT provides the actual pointer index where the data for the pointer going up or down can be found.

AMOTION_EVENT_ACTION_POINTER_UP

A non-primary pointer has gone up.

The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed.

AMOTION_EVENT_ACTION_SCROLL

The motion event contains relative vertical and/or horizontal scroll offsets.

Use AMotionEvent_getAxisValue to retrieve the information from AMOTION_EVENT_AXIS_VSCROLL and AMOTION_EVENT_AXIS_HSCROLL. The pointer may or may not be down when this event is dispatched. This action is always delivered to the winder under the pointer, which may not be the window currently touched.

AMOTION_EVENT_ACTION_UP

A pressed gesture has finished, the motion contains the final release location as well as any intermediate points since the last down or move event.

Anonymous Enum 38

Declared in android/input.h
 Anonymous Enum 38

Motion event flags.

Properties
AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED

This flag indicates that the window that received this motion event is partly or wholly obscured by another visible window above it.

This flag is set to true even if the event did not directly pass through the obscured area. A security sensitive application can check this flag to identify situations in which a malicious application may have covered up part of its content for the purpose of misleading the user or hijacking touches. An appropriate response might be to drop the suspect touches or to take additional precautions to confirm the user's actual intent.

Anonymous Enum 39

Declared in android/input.h
 Anonymous Enum 39

Motion event edge touch flags.

Properties
AMOTION_EVENT_EDGE_FLAG_BOTTOM

Flag indicating the motion event intersected the bottom edge of the screen.

AMOTION_EVENT_EDGE_FLAG_LEFT

Flag indicating the motion event intersected the left edge of the screen.

AMOTION_EVENT_EDGE_FLAG_NONE

No edges intersected.

AMOTION_EVENT_EDGE_FLAG_RIGHT

Flag indicating the motion event intersected the right edge of the screen.

AMOTION_EVENT_EDGE_FLAG_TOP

Flag indicating the motion event intersected the top edge of the screen.

Anonymous Enum 40

Declared in android/input.h
 Anonymous Enum 40

Constants that identify each individual axis of a motion event.

Properties
AMOTION_EVENT_AXIS_BRAKE

Axis constant: Brake axis of a motion event.

  • For a joystick, reports the absolute position of the brake control. The value is normalized to a range from 0.0 (no braking) to 1.0 (maximum braking).

AMOTION_EVENT_AXIS_DISTANCE

Axis constant: Distance axis of a motion event.

  • For a stylus, reports the distance of the stylus from the screen. A value of 0.0 indicates direct contact and larger values indicate increasing distance from the surface.

AMOTION_EVENT_AXIS_GAS

Axis constant: Gas axis of a motion event.

  • For a joystick, reports the absolute position of the gas (accelerator) control. The value is normalized to a range from 0.0 (no acceleration) to 1.0 (maximum acceleration).

AMOTION_EVENT_AXIS_GENERIC_1

Axis constant: Generic 1 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_10

Axis constant: Generic 10 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_11

Axis constant: Generic 11 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_12

Axis constant: Generic 12 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_13

Axis constant: Generic 13 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_14

Axis constant: Generic 14 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_15

Axis constant: Generic 15 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_16

Axis constant: Generic 16 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_2

Axis constant: Generic 2 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_3

Axis constant: Generic 3 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_4

Axis constant: Generic 4 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_5

Axis constant: Generic 5 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_6

Axis constant: Generic 6 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_7

Axis constant: Generic 7 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_8

Axis constant: Generic 8 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GENERIC_9

Axis constant: Generic 9 axis of a motion event.

The interpretation of a generic axis is device-specific.

AMOTION_EVENT_AXIS_GESTURE_PINCH_SCALE_FACTOR

Axis constant: pinch scale factor of a motion event.

  • For a touch pad, reports the change in distance between the fingers when the user is making a pinch gesture, as a proportion of that distance when the gesture was last reported. For example, if the fingers were 50 units apart and are now 52 units apart, the scale factor would be 1.04.

These values are relative to the state from the last event, not accumulated, so developers should make sure to process this axis value for all batched historical events.

This axis is only set on the first pointer in a motion event.

AMOTION_EVENT_AXIS_GESTURE_SCROLL_X_DISTANCE

Axis constant: X scroll distance axis of a motion event.

  • For a touch pad, reports the distance that should be scrolled in the X axis as a result of the user's two-finger scroll gesture, in display pixels.

These values are relative to the state from the last event, not accumulated, so developers should make sure to process this axis value for all batched historical events.

This axis is only set on the first pointer in a motion event.

AMOTION_EVENT_AXIS_GESTURE_SCROLL_Y_DISTANCE

Axis constant: Y scroll distance axis of a motion event.

The same as AMOTION_EVENT_AXIS_GESTURE_SCROLL_X_DISTANCE, but for the Y axis.

AMOTION_EVENT_AXIS_GESTURE_SWIPE_FINGER_COUNT

Axis constant: the number of fingers being used in a multi-finger swipe gesture.

  • For a touch pad, reports the number of fingers being used in a multi-finger swipe gesture (with CLASSIFICATION_MULTI_FINGER_SWIPE).

Since CLASSIFICATION_MULTI_FINGER_SWIPE is a hidden API, so is this axis. It is only set on the first pointer in a motion event.

AMOTION_EVENT_AXIS_GESTURE_X_OFFSET

Axis constant: X gesture offset axis of a motion event.

  • For a touch pad, reports the distance that a swipe gesture has moved in the X axis, as a proportion of the touch pad's size. For example, if a touch pad is 1000 units wide, and a swipe gesture starts at X = 500 then moves to X = 400, this axis would have a value of -0.1.

These values are relative to the state from the last event, not accumulated, so developers should make sure to process this axis value for all batched historical events.

This axis is only set on the first pointer in a motion event.

AMOTION_EVENT_AXIS_GESTURE_Y_OFFSET

Axis constant: Y gesture offset axis of a motion event.

The same as AMOTION_EVENT_AXIS_GESTURE_X_OFFSET, but for the Y axis.

AMOTION_EVENT_AXIS_HAT_X

Axis constant: Hat X axis of a motion event.

  • For a joystick, reports the absolute X position of the directional hat control. The value is normalized to a range from -1.0 (left) to 1.0 (right).

AMOTION_EVENT_AXIS_HAT_Y

Axis constant: Hat Y axis of a motion event.

  • For a joystick, reports the absolute Y position of the directional hat control. The value is normalized to a range from -1.0 (up) to 1.0 (down).

AMOTION_EVENT_AXIS_HSCROLL

Axis constant: Horizontal Scroll axis of a motion event.

  • For a mouse, reports the relative movement of the horizontal scroll wheel. The value is normalized to a range from -1.0 (left) to 1.0 (right).

This axis should be used to scroll views horizontally.

AMOTION_EVENT_AXIS_LTRIGGER

Axis constant: Left Trigger axis of a motion event.

  • For a joystick, reports the absolute position of the left trigger control. The value is normalized to a range from 0.0 (released) to 1.0 (fully pressed).

AMOTION_EVENT_AXIS_ORIENTATION

Axis constant: Orientation axis of a motion event.

  • For a touch screen or touch pad, reports the orientation of the finger or tool in radians relative to the vertical plane of the device. An angle of 0 radians indicates that the major axis of contact is oriented upwards, is perfectly circular or is of unknown orientation. A positive angle indicates that the major axis of contact is oriented to the right. A negative angle indicates that the major axis of contact is oriented to the left. The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians (finger pointing fully right).
  • For a stylus, the orientation indicates the direction in which the stylus is pointing in relation to the vertical axis of the current orientation of the screen. The range is from -PI radians to PI radians, where 0 is pointing up, -PI/2 radians is pointing left, -PI or PI radians is pointing down, and PI/2 radians is pointing right. See also AMOTION_EVENT_AXIS_TILT.

AMOTION_EVENT_AXIS_PRESSURE

Axis constant: Pressure axis of a motion event.

  • For a touch screen or touch pad, reports the approximate pressure applied to the surface by a finger or other tool. The value is normalized to a range from 0 (no pressure at all) to 1 (normal pressure), although values higher than 1 may be generated depending on the calibration of the input device.
  • For a trackball, the value is set to 1 if the trackball button is pressed or 0 otherwise.
  • For a mouse, the value is set to 1 if the primary mouse button is pressed or 0 otherwise.

AMOTION_EVENT_AXIS_RELATIVE_X

Axis constant: The movement of x position of a motion event.

  • For a mouse, reports a difference of x position between the previous position. This is useful when pointer is captured, in that case the mouse pointer doesn't change the location but this axis reports the difference which allows the app to see how the mouse is moved.

AMOTION_EVENT_AXIS_RELATIVE_Y

Axis constant: The movement of y position of a motion event.

Same as AMOTION_EVENT_AXIS_RELATIVE_X, but for y position.

AMOTION_EVENT_AXIS_RTRIGGER

Axis constant: Right Trigger axis of a motion event.

  • For a joystick, reports the absolute position of the right trigger control. The value is normalized to a range from 0.0 (released) to 1.0 (fully pressed).

AMOTION_EVENT_AXIS_RUDDER

Axis constant: Rudder axis of a motion event.

  • For a joystick, reports the absolute position of the rudder control. The value is normalized to a range from -1.0 (turn left) to 1.0 (turn right).

AMOTION_EVENT_AXIS_RX

Axis constant: X Rotation axis of a motion event.

  • For a joystick, reports the absolute rotation angle about the X axis. The value is normalized to a range from -1.0 (counter-clockwise) to 1.0 (clockwise).

AMOTION_EVENT_AXIS_RY

Axis constant: Y Rotation axis of a motion event.

  • For a joystick, reports the absolute rotation angle about the Y axis. The value is normalized to a range from -1.0 (counter-clockwise) to 1.0 (clockwise).

AMOTION_EVENT_AXIS_RZ

Axis constant: Z Rotation axis of a motion event.

  • For a joystick, reports the absolute rotation angle about the Z axis. The value is normalized to a range from -1.0 (counter-clockwise) to 1.0 (clockwise). On game pads with two analog joysticks, this axis is often reinterpreted to report the absolute Y position of the second joystick instead.

AMOTION_EVENT_AXIS_SCROLL

Axis constant: Generic scroll axis of a motion event.

  • This is used for scroll axis motion events that can't be classified as strictly vertical or horizontal. The movement of a rotating scroller is an example of this.

AMOTION_EVENT_AXIS_SIZE

Axis constant: Size axis of a motion event.

  • For a touch screen or touch pad, reports the approximate size of the contact area in relation to the maximum detectable size for the device. The value is normalized to a range from 0 (smallest detectable size) to 1 (largest detectable size), although it is not a linear scale. This value is of limited use. To obtain calibrated size information, see AMOTION_EVENT_AXIS_TOUCH_MAJOR or AMOTION_EVENT_AXIS_TOOL_MAJOR.

AMOTION_EVENT_AXIS_THROTTLE

Axis constant: Throttle axis of a motion event.

  • For a joystick, reports the absolute position of the throttle control. The value is normalized to a range from 0.0 (fully open) to 1.0 (fully closed).

AMOTION_EVENT_AXIS_TILT

Axis constant: Tilt axis of a motion event.

  • For a stylus, reports the tilt angle of the stylus in radians where 0 radians indicates that the stylus is being held perpendicular to the surface, and PI/2 radians indicates that the stylus is being held flat against the surface.

AMOTION_EVENT_AXIS_TOOL_MAJOR

Axis constant: ToolMajor axis of a motion event.

  • For a touch screen, reports the length of the major axis of an ellipse that represents the size of the approaching finger or tool used to make contact.
  • For a touch pad, reports the length of the major axis of an ellipse that represents the size of the approaching finger or tool used to make contact. The units are device-dependent.

When the touch is circular, the major and minor axis lengths will be equal to one another.

The tool size may be larger than the touch size since the tool may not be fully in contact with the touch sensor.

AMOTION_EVENT_AXIS_TOOL_MINOR

Axis constant: ToolMinor axis of a motion event.

  • For a touch screen, reports the length of the minor axis of an ellipse that represents the size of the approaching finger or tool used to make contact.
  • For a touch pad, reports the length of the minor axis of an ellipse that represents the size of the approaching finger or tool used to make contact. The units are device-dependent.

When the touch is circular, the major and minor axis lengths will be equal to one another.

The tool size may be larger than the touch size since the tool may not be fully in contact with the touch sensor.

AMOTION_EVENT_AXIS_TOUCH_MAJOR

Axis constant: TouchMajor axis of a motion event.

  • For a touch screen, reports the length of the major axis of an ellipse that represents the touch area at the point of contact. The units are display pixels.
  • For a touch pad, reports the length of the major axis of an ellipse that represents the touch area at the point of contact. The units are device-dependent.

AMOTION_EVENT_AXIS_TOUCH_MINOR

Axis constant: TouchMinor axis of a motion event.

  • For a touch screen, reports the length of the minor axis of an ellipse that represents the touch area at the point of contact. The units are display pixels.
  • For a touch pad, reports the length of the minor axis of an ellipse that represents the touch area at the point of contact. The units are device-dependent.

When the touch is circular, the major and minor axis lengths will be equal to one another.

AMOTION_EVENT_AXIS_VSCROLL

Axis constant: Vertical Scroll axis of a motion event.

  • For a mouse, reports the relative movement of the vertical scroll wheel. The value is normalized to a range from -1.0 (down) to 1.0 (up).

This axis should be used to scroll views vertically.

AMOTION_EVENT_AXIS_WHEEL

Axis constant: Wheel axis of a motion event.

  • For a joystick, reports the absolute position of the steering wheel control. The value is normalized to a range from -1.0 (turn left) to 1.0 (turn right).

AMOTION_EVENT_AXIS_X

Axis constant: X axis of a motion event.

  • For a touch screen, reports the absolute X screen position of the center of the touch contact area. The units are display pixels.
  • For a touch pad, reports the absolute X surface position of the center of the touch contact area. The units are device-dependent.
  • For a mouse, reports the absolute X screen position of the mouse pointer. The units are display pixels.
  • For a trackball, reports the relative horizontal displacement of the trackball. The value is normalized to a range from -1.0 (left) to 1.0 (right).
  • For a joystick, reports the absolute X position of the joystick. The value is normalized to a range from -1.0 (left) to 1.0 (right).

AMOTION_EVENT_AXIS_Y

Axis constant: Y axis of a motion event.

  • For a touch screen, reports the absolute Y screen position of the center of the touch contact area. The units are display pixels.
  • For a touch pad, reports the absolute Y surface position of the center of the touch contact area. The units are device-dependent.
  • For a mouse, reports the absolute Y screen position of the mouse pointer. The units are display pixels.
  • For a trackball, reports the relative vertical displacement of the trackball. The value is normalized to a range from -1.0 (up) to 1.0 (down).
  • For a joystick, reports the absolute Y position of the joystick. The value is normalized to a range from -1.0 (up or far) to 1.0 (down or near).

AMOTION_EVENT_AXIS_Z

Axis constant: Z axis of a motion event.

  • For a joystick, reports the absolute Z position of the joystick. The value is normalized to a range from -1.0 (high) to 1.0 (low). On game pads with two analog joysticks, this axis is often reinterpreted to report the absolute X position of the second joystick instead.

AMOTION_EVENT_MAXIMUM_VALID_AXIS_VALUE

Note: This is not an "Axis constant".

It does not represent any axis, nor should it be used to represent any axis. It is a constant holding the value of the largest defined axis value, to make some computations (like iterating through all possible axes) cleaner. Please update the value accordingly if you add a new axis.

Anonymous Enum 41

Declared in android/input.h
 Anonymous Enum 41

Constants that identify buttons that are associated with motion events.

Refer to the documentation on the MotionEvent class for descriptions of each button.

Properties
AMOTION_EVENT_BUTTON_BACK

back

AMOTION_EVENT_BUTTON_FORWARD

forward

AMOTION_EVENT_BUTTON_PRIMARY

primary

AMOTION_EVENT_BUTTON_SECONDARY

secondary

AMOTION_EVENT_BUTTON_STYLUS_PRIMARY
AMOTION_EVENT_BUTTON_STYLUS_SECONDARY
AMOTION_EVENT_BUTTON_TERTIARY

tertiary

Anonymous Enum 42

Declared in android/input.h
 Anonymous Enum 42

Constants that identify tool types.

Refer to the documentation on the MotionEvent class for descriptions of each tool type.

Properties
AMOTION_EVENT_TOOL_TYPE_ERASER

eraser

AMOTION_EVENT_TOOL_TYPE_FINGER

finger

AMOTION_EVENT_TOOL_TYPE_MOUSE

mouse

AMOTION_EVENT_TOOL_TYPE_PALM

palm

AMOTION_EVENT_TOOL_TYPE_STYLUS

stylus

AMOTION_EVENT_TOOL_TYPE_UNKNOWN

unknown

Anonymous Enum 43

Declared in android/input.h
 Anonymous Enum 43

Input source masks.

Refer to the documentation on android.view.InputDevice for more details about input sources and their correct interpretation.

Properties
AINPUT_SOURCE_CLASS_BUTTON

button

AINPUT_SOURCE_CLASS_JOYSTICK

joystick

AINPUT_SOURCE_CLASS_MASK

mask

AINPUT_SOURCE_CLASS_NAVIGATION

navigation

AINPUT_SOURCE_CLASS_NONE

none

AINPUT_SOURCE_CLASS_POINTER

pointer

AINPUT_SOURCE_CLASS_POSITION

position

Anonymous Enum 45

Declared in android/input.h
 Anonymous Enum 45

Keyboard types.

Refer to the documentation on android.view.InputDevice for more details. Note: When adding a new keyboard type here InputDeviceInfo::setKeyboardType needs to be updated.

Properties
AINPUT_KEYBOARD_TYPE_ALPHABETIC

alphabetic

AINPUT_KEYBOARD_TYPE_NONE

none

AINPUT_KEYBOARD_TYPE_NON_ALPHABETIC

non alphabetic

Anonymous Enum 46

Declared in android/input.h
 Anonymous Enum 46

Constants used to retrieve information about the range of motion for a particular coordinate of a motion event.

Refer to the documentation on android.view.InputDevice for more details about input sources and their correct interpretation.

Properties
AINPUT_MOTION_RANGE_ORIENTATION

orientation

AINPUT_MOTION_RANGE_PRESSURE

pressure

AINPUT_MOTION_RANGE_SIZE

size

AINPUT_MOTION_RANGE_TOOL_MAJOR

tool major

AINPUT_MOTION_RANGE_TOOL_MINOR

tool minor

AINPUT_MOTION_RANGE_TOUCH_MAJOR

touch major

AINPUT_MOTION_RANGE_TOUCH_MINOR

touch minor

AINPUT_MOTION_RANGE_X

x

AINPUT_MOTION_RANGE_Y

y

Anonymous Enum 47

Declared in android/keycodes.h
 Anonymous Enum 47

Key codes.

Properties
AKEYCODE_0

'0' key.

AKEYCODE_1

'1' key.

AKEYCODE_11

'11' key.

AKEYCODE_12

'12' key.

AKEYCODE_2

'2' key.

AKEYCODE_3

'3' key.

AKEYCODE_3D_MODE

3D Mode key.

Toggles the display between 2D and 3D mode.

AKEYCODE_4

'4' key.

AKEYCODE_5

'5' key.

AKEYCODE_6

'6' key.

AKEYCODE_7

'7' key.

AKEYCODE_8

'8' key.

AKEYCODE_9

'9' key.

AKEYCODE_A

'A' key.

AKEYCODE_ALL_APPS

all apps

AKEYCODE_ALT_LEFT

Left Alt modifier key.

AKEYCODE_ALT_RIGHT

Right Alt modifier key.

AKEYCODE_APOSTROPHE

''' (apostrophe) key.

AKEYCODE_APP_SWITCH

App switch key.

Should bring up the application switcher dialog.

AKEYCODE_ASSIST

Assist key.

Launches the global assist activity. Not delivered to applications.

AKEYCODE_AT

'@' key.

AKEYCODE_AVR_INPUT

A/V Receiver input key.

On TV remotes, switches the input mode on an external A/V Receiver.

AKEYCODE_AVR_POWER

A/V Receiver power key.

On TV remotes, toggles the power on an external A/V Receiver.

AKEYCODE_B

'B' key.

AKEYCODE_BACK

Back key.

AKEYCODE_BACKSLASH

'\' key.

AKEYCODE_BOOKMARK

Bookmark key.

On some TV remotes, bookmarks content or web pages.

AKEYCODE_BREAK

Break / Pause key.

AKEYCODE_BRIGHTNESS_DOWN

Brightness Down key.

Adjusts the screen brightness down.

AKEYCODE_BRIGHTNESS_UP

Brightness Up key.

Adjusts the screen brightness up.

AKEYCODE_BUTTON_1

Generic Game Pad Button #1.

AKEYCODE_BUTTON_10

Generic Game Pad Button #10.

AKEYCODE_BUTTON_11

Generic Game Pad Button #11.

AKEYCODE_BUTTON_12

Generic Game Pad Button #12.

AKEYCODE_BUTTON_13

Generic Game Pad Button #13.

AKEYCODE_BUTTON_14

Generic Game Pad Button #14.

AKEYCODE_BUTTON_15

Generic Game Pad Button #15.

AKEYCODE_BUTTON_16

Generic Game Pad Button #16.

AKEYCODE_BUTTON_2

Generic Game Pad Button #2.

AKEYCODE_BUTTON_3

Generic Game Pad Button #3.

AKEYCODE_BUTTON_4

Generic Game Pad Button #4.

AKEYCODE_BUTTON_5

Generic Game Pad Button #5.

AKEYCODE_BUTTON_6

Generic Game Pad Button #6.

AKEYCODE_BUTTON_7

Generic Game Pad Button #7.

AKEYCODE_BUTTON_8

Generic Game Pad Button #8.

AKEYCODE_BUTTON_9

Generic Game Pad Button #9.

AKEYCODE_BUTTON_A

A Button key.

On a game controller, the A button should be either the button labeled A or the first button on the bottom row of controller buttons.

AKEYCODE_BUTTON_B

B Button key.

On a game controller, the B button should be either the button labeled B or the second button on the bottom row of controller buttons.

AKEYCODE_BUTTON_C

C Button key.

On a game controller, the C button should be either the button labeled C or the third button on the bottom row of controller buttons.

AKEYCODE_BUTTON_L1

L1 Button key.

On a game controller, the L1 button should be either the button labeled L1 (or L) or the top left trigger button.

AKEYCODE_BUTTON_L2

L2 Button key.

On a game controller, the L2 button should be either the button labeled L2 or the bottom left trigger button.

AKEYCODE_BUTTON_MODE

Mode Button key.

On a game controller, the button labeled Mode.

AKEYCODE_BUTTON_R1

R1 Button key.

On a game controller, the R1 button should be either the button labeled R1 (or R) or the top right trigger button.

AKEYCODE_BUTTON_R2

R2 Button key.

On a game controller, the R2 button should be either the button labeled R2 or the bottom right trigger button.

AKEYCODE_BUTTON_SELECT

Select Button key.

On a game controller, the button labeled Select.

AKEYCODE_BUTTON_START

Start Button key.

On a game controller, the button labeled Start.

AKEYCODE_BUTTON_THUMBL

Left Thumb Button key.

On a game controller, the left thumb button indicates that the left (or only) joystick is pressed.

AKEYCODE_BUTTON_THUMBR

Right Thumb Button key.

On a game controller, the right thumb button indicates that the right joystick is pressed.

AKEYCODE_BUTTON_X

X Button key.

On a game controller, the X button should be either the button labeled X or the first button on the upper row of controller buttons.

AKEYCODE_BUTTON_Y

Y Button key.

On a game controller, the Y button should be either the button labeled Y or the second button on the upper row of controller buttons.

AKEYCODE_BUTTON_Z

Z Button key.

On a game controller, the Z button should be either the button labeled Z or the third button on the upper row of controller buttons.

AKEYCODE_C

'C' key.

AKEYCODE_CALCULATOR

Calculator special function key.

Used to launch a calculator application.

AKEYCODE_CALENDAR

Calendar special function key.

Used to launch a calendar application.

AKEYCODE_CALL

Call key.

AKEYCODE_CAMERA

Camera key.

Used to launch a camera application or take pictures.

AKEYCODE_CAPS_LOCK

Caps Lock key.

AKEYCODE_CAPTIONS

Toggle captions key.

Switches the mode for closed-captioning text, for example during television shows.

AKEYCODE_CHANNEL_DOWN

Channel down key.

On TV remotes, decrements the television channel.

AKEYCODE_CHANNEL_UP

Channel up key.

On TV remotes, increments the television channel.

AKEYCODE_CLEAR

Clear key.

AKEYCODE_COMMA

',' key.

AKEYCODE_CONTACTS

Contacts special function key.

Used to launch an address book application.

AKEYCODE_COPY

Copy key.

AKEYCODE_CTRL_LEFT

Left Control modifier key.

AKEYCODE_CTRL_RIGHT

Right Control modifier key.

AKEYCODE_CUT

Cut key.

AKEYCODE_D

'D' key.

AKEYCODE_DEL

Backspace key.

Deletes characters before the insertion point, unlike AKEYCODE_FORWARD_DEL.

AKEYCODE_DEMO_APP_1

Demo Application key #1.

AKEYCODE_DEMO_APP_2

Demo Application key #2.

AKEYCODE_DEMO_APP_3

Demo Application key #3.

AKEYCODE_DEMO_APP_4

Demo Application key #4.

AKEYCODE_DPAD_CENTER

Directional Pad Center key.

May also be synthesized from trackball motions.

AKEYCODE_DPAD_DOWN

Directional Pad Down key.

May also be synthesized from trackball motions.

AKEYCODE_DPAD_DOWN_LEFT

Directional Pad Down-Left.

AKEYCODE_DPAD_DOWN_RIGHT

Directional Pad Down-Right.

AKEYCODE_DPAD_LEFT

Directional Pad Left key.

May also be synthesized from trackball motions.

AKEYCODE_DPAD_RIGHT

Directional Pad Right key.

May also be synthesized from trackball motions.

AKEYCODE_DPAD_UP

Directional Pad Up key.

May also be synthesized from trackball motions.

AKEYCODE_DPAD_UP_LEFT

Directional Pad Up-Left.

AKEYCODE_DPAD_UP_RIGHT

Directional Pad Up-Right.

AKEYCODE_DVR

DVR key.

On some TV remotes, switches to a DVR mode for recorded shows.

AKEYCODE_E

'E' key.

AKEYCODE_EISU

Japanese alphanumeric key.

AKEYCODE_EMOJI_PICKER

Open Emoji picker.

AKEYCODE_ENDCALL

End Call key.

AKEYCODE_ENTER

Enter key.

AKEYCODE_ENVELOPE

Envelope special function key.

Used to launch a mail application.

AKEYCODE_EQUALS

'=' key.

AKEYCODE_ESCAPE

Escape key.

AKEYCODE_EXPLORER

Explorer special function key.

Used to launch a browser application.

AKEYCODE_F

'F' key.

AKEYCODE_F1

F1 key.

AKEYCODE_F10

F10 key.

AKEYCODE_F11

F11 key.

AKEYCODE_F12

F12 key.

AKEYCODE_F2

F2 key.

AKEYCODE_F3

F3 key.

AKEYCODE_F4

F4 key.

AKEYCODE_F5

F5 key.

AKEYCODE_F6

F6 key.

AKEYCODE_F7

F7 key.

AKEYCODE_F8

F8 key.

AKEYCODE_F9

F9 key.

AKEYCODE_FEATURED_APP_1

Featured Application key #1.

AKEYCODE_FEATURED_APP_2

Featured Application key #2.

AKEYCODE_FEATURED_APP_3

Featured Application key #3.

AKEYCODE_FEATURED_APP_4

Featured Application key #4.

AKEYCODE_FOCUS

Camera Focus key.

Used to focus the camera.

AKEYCODE_FORWARD

Forward key.

Navigates forward in the history stack. Complement of AKEYCODE_BACK.

AKEYCODE_FORWARD_DEL

Forward Delete key.

Deletes characters ahead of the insertion point, unlike AKEYCODE_DEL.

AKEYCODE_FUNCTION

Function modifier key.

AKEYCODE_G

'G' key.

AKEYCODE_GRAVE

'`' (backtick) key.

AKEYCODE_GUIDE

Guide key.

On TV remotes, shows a programming guide.

AKEYCODE_H

'H' key.

AKEYCODE_HEADSETHOOK

Headset Hook key.

Used to hang up calls and stop media.

AKEYCODE_HELP

Help key.

AKEYCODE_HENKAN

Japanese conversion key.

AKEYCODE_HOME

Home key.

This key is handled by the framework and is never delivered to applications.

AKEYCODE_I

'I' key.

AKEYCODE_INFO

Info key.

Common on TV remotes to show additional information related to what is currently being viewed.

AKEYCODE_INSERT

Insert key.

Toggles insert / overwrite edit mode.

AKEYCODE_J

'J' key.

AKEYCODE_K

'K' key.

AKEYCODE_KANA

Japanese kana key.

AKEYCODE_KATAKANA_HIRAGANA

Japanese katakana / hiragana key.

AKEYCODE_KEYBOARD_BACKLIGHT_DOWN

Keyboard backlight Down key.

Adjusts the keyboard backlight brightness down.

AKEYCODE_KEYBOARD_BACKLIGHT_TOGGLE

Keyboard backlight Toggle key.

Toggles the keyboard backlight on/off.

AKEYCODE_KEYBOARD_BACKLIGHT_UP

Keyboard backlight Up key.

Adjusts the keyboard backlight brightness up.

AKEYCODE_L

'L' key.

AKEYCODE_LANGUAGE_SWITCH

Language Switch key.

Toggles the current input language such as switching between English and Japanese on a QWERTY keyboard. On some devices, the same function may be performed by pressing Shift+Spacebar.

AKEYCODE_LAST_CHANNEL

Last Channel key.

Goes to the last viewed channel.

AKEYCODE_LEFT_BRACKET

'[' key.

AKEYCODE_M

'M' key.

AKEYCODE_MACRO_1

User customizable key #1.

AKEYCODE_MACRO_2

User customizable key #2.

AKEYCODE_MACRO_3

User customizable key #3.

AKEYCODE_MACRO_4

User customizable key #4.

AKEYCODE_MANNER_MODE

Manner Mode key.

Toggles silent or vibrate mode on and off to make the device behave more politely in certain settings such as on a crowded train. On some devices, the key may only operate when long-pressed.

AKEYCODE_MEDIA_AUDIO_TRACK

Audio Track key.

Switches the audio tracks.

AKEYCODE_MEDIA_CLOSE

Close media key.

May be used to close a CD tray, for example.

AKEYCODE_MEDIA_EJECT

Eject media key.

May be used to eject a CD tray, for example.

AKEYCODE_MEDIA_FAST_FORWARD

Fast Forward media key.

AKEYCODE_MEDIA_NEXT

Play Next media key.

AKEYCODE_MEDIA_PAUSE

Pause media key.

AKEYCODE_MEDIA_PLAY

Play media key.

AKEYCODE_MEDIA_PLAY_PAUSE

Play/Pause media key.

AKEYCODE_MEDIA_PREVIOUS

Play Previous media key.

AKEYCODE_MEDIA_RECORD

Record media key.

AKEYCODE_MEDIA_REWIND

Rewind media key.

AKEYCODE_MEDIA_SKIP_BACKWARD

Skip backward media key.

AKEYCODE_MEDIA_SKIP_FORWARD

Skip forward media key.

AKEYCODE_MEDIA_STEP_BACKWARD

Step backward media key.

Steps media backward one from at a time.

AKEYCODE_MEDIA_STEP_FORWARD

Step forward media key.

Steps media forward one from at a time.

AKEYCODE_MEDIA_STOP

Stop media key.

AKEYCODE_MEDIA_TOP_MENU

Media Top Menu key.

Goes to the top of media menu.

AKEYCODE_MENU

Menu key.

AKEYCODE_META_LEFT

Left Meta modifier key.

AKEYCODE_META_RIGHT

Right Meta modifier key.

AKEYCODE_MINUS

'-'.

AKEYCODE_MOVE_END

End Movement key.

Used for scrolling or moving the cursor around to the end of a line or to the bottom of a list.

AKEYCODE_MOVE_HOME

Home Movement key.

Used for scrolling or moving the cursor around to the start of a line or to the top of a list.

AKEYCODE_MUHENKAN

Japanese non-conversion key.

AKEYCODE_MUSIC

Music special function key.

Used to launch a music player application.

AKEYCODE_MUTE

Mute key.

Mutes the microphone, unlike AKEYCODE_VOLUME_MUTE.

AKEYCODE_N

'N' key.

AKEYCODE_NAVIGATE_IN
AKEYCODE_NAVIGATE_NEXT
AKEYCODE_NAVIGATE_OUT
AKEYCODE_NAVIGATE_PREVIOUS
AKEYCODE_NOTIFICATION

Notification key.

AKEYCODE_NUM

Number modifier key.

Used to enter numeric symbols. This key is not AKEYCODE_NUM_LOCK; it is more like AKEYCODE_ALT_LEFT.

AKEYCODE_NUMPAD_0

Numeric keypad '0' key.

AKEYCODE_NUMPAD_1

Numeric keypad '1' key.

AKEYCODE_NUMPAD_2

Numeric keypad '2' key.

AKEYCODE_NUMPAD_3

Numeric keypad '3' key.

AKEYCODE_NUMPAD_4

Numeric keypad '4' key.

AKEYCODE_NUMPAD_5

Numeric keypad '5' key.

AKEYCODE_NUMPAD_6

Numeric keypad '6' key.

AKEYCODE_NUMPAD_7

Numeric keypad '7' key.

AKEYCODE_NUMPAD_8

Numeric keypad '8' key.

AKEYCODE_NUMPAD_9

Numeric keypad '9' key.

AKEYCODE_NUMPAD_ADD

Numeric keypad '+' key (for addition).

AKEYCODE_NUMPAD_COMMA

Numeric keypad ',' key (for decimals or digit grouping).

AKEYCODE_NUMPAD_DIVIDE

Numeric keypad '/' key (for division).

AKEYCODE_NUMPAD_DOT

Numeric keypad '.

' key (for decimals or digit grouping).

AKEYCODE_NUMPAD_ENTER

Numeric keypad Enter key.

AKEYCODE_NUMPAD_EQUALS

Numeric keypad '=' key.

AKEYCODE_NUMPAD_LEFT_PAREN

Numeric keypad '(' key.

AKEYCODE_NUMPAD_MULTIPLY

Numeric keypad '*' key (for multiplication).

AKEYCODE_NUMPAD_RIGHT_PAREN

Numeric keypad ')' key.

AKEYCODE_NUMPAD_SUBTRACT

Numeric keypad '-' key (for subtraction).

AKEYCODE_NUM_LOCK

Num Lock key.

This is the Num Lock key; it is different from AKEYCODE_NUM. This key alters the behavior of other keys on the numeric keypad.

AKEYCODE_O

'O' key.

AKEYCODE_P

'P' key.

AKEYCODE_PAGE_DOWN

Page Down key.

AKEYCODE_PAGE_UP

Page Up key.

AKEYCODE_PAIRING

Pairing key.

Initiates peripheral pairing mode. Useful for pairing remote control devices or game controllers, especially if no other input mode is available.

AKEYCODE_PASTE

Paste key.

AKEYCODE_PERIOD

'.

' key.

AKEYCODE_PICTSYMBOLS

Picture Symbols modifier key.

Used to switch symbol sets (Emoji, Kao-moji).

AKEYCODE_PLUS

'+' key.

AKEYCODE_POUND

'#' key.

AKEYCODE_POWER

Power key.

AKEYCODE_PROFILE_SWITCH

Used to switch current account that is consuming content.

May be consumed by system to switch current viewer profile.

AKEYCODE_PROG_BLUE

Blue "programmable" key.

On TV remotes, acts as a contextual/programmable key.

AKEYCODE_PROG_GREEN

Green "programmable" key.

On TV remotes, actsas a contextual/programmable key.

AKEYCODE_PROG_RED

Red "programmable" key.

On TV remotes, acts as a contextual/programmable key.

AKEYCODE_PROG_YELLOW

Yellow "programmable" key.

On TV remotes, acts as a contextual/programmable key.

AKEYCODE_Q

'Q' key.

AKEYCODE_R

'R' key.

AKEYCODE_RECENT_APPS

Key to open recent apps (a.k.a.

Overview)

AKEYCODE_REFRESH

refresh key

AKEYCODE_RIGHT_BRACKET

']' key.

AKEYCODE_RO

Japanese Ro key.

AKEYCODE_S

'S' key.

AKEYCODE_SCREENSHOT

Take Screenshot.

AKEYCODE_SCROLL_LOCK

Scroll Lock key.

AKEYCODE_SEARCH

Search key.

AKEYCODE_SEMICOLON

';' key.

AKEYCODE_SETTINGS

Settings key.

Starts the system settings activity.

AKEYCODE_SHIFT_LEFT

Left Shift modifier key.

AKEYCODE_SHIFT_RIGHT

Right Shift modifier key.

AKEYCODE_SLASH

'/' key.

AKEYCODE_SLEEP

Sleep key.

Puts the device to sleep. Behaves somewhat like AKEYCODE_POWER but it has no effect if the device is already asleep.

AKEYCODE_SOFT_LEFT

Soft Left key.

Usually situated below the display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom left of the display.

AKEYCODE_SOFT_RIGHT

Soft Right key.

Usually situated below the display on phones and used as a multi-function feature key for selecting a software defined function shown on the bottom right of the display.

AKEYCODE_SOFT_SLEEP

Put device to sleep unless a wakelock is held.

AKEYCODE_SPACE

Space key.

AKEYCODE_STAR

'*' key.

AKEYCODE_STB_INPUT

Set-top-box input key.

On TV remotes, switches the input mode on an external Set-top-box.

AKEYCODE_STB_POWER

Set-top-box power key.

On TV remotes, toggles the power on an external Set-top-box.

AKEYCODE_STEM_1

Generic stem key 1 for Wear.

AKEYCODE_STEM_2

Generic stem key 2 for Wear.

AKEYCODE_STEM_3

Generic stem key 3 for Wear.

AKEYCODE_STEM_PRIMARY

Primary stem key for Wear Main power/reset button on watch.

AKEYCODE_STYLUS_BUTTON_PRIMARY

The primary button on the barrel of a stylus.

This is usually the button closest to the tip of the stylus.

AKEYCODE_STYLUS_BUTTON_SECONDARY

The secondary button on the barrel of a stylus.

This is usually the second button from the tip of the stylus.

AKEYCODE_STYLUS_BUTTON_TAIL

A button on the tail end of a stylus.

AKEYCODE_STYLUS_BUTTON_TERTIARY

The tertiary button on the barrel of a stylus.

This is usually the third button from the tip of the stylus.

AKEYCODE_SWITCH_CHARSET

Switch Charset modifier key.

Used to switch character sets (Kanji, Katakana).

AKEYCODE_SYM

Symbol modifier key.

Used to enter alternate symbols.

AKEYCODE_SYSRQ

System Request / Print Screen key.

AKEYCODE_SYSTEM_NAVIGATION_DOWN

fingerprint navigation key, down.

AKEYCODE_SYSTEM_NAVIGATION_LEFT

fingerprint navigation key, left.

AKEYCODE_SYSTEM_NAVIGATION_RIGHT

fingerprint navigation key, right.

AKEYCODE_SYSTEM_NAVIGATION_UP

fingerprint navigation key, up.

AKEYCODE_T

'T' key.

AKEYCODE_TAB

Tab key.

AKEYCODE_THUMBS_DOWN

Thumbs down key.

Apps can use this to let user downvote content.

AKEYCODE_THUMBS_UP

Thumbs up key.

Apps can use this to let user upvote content.

AKEYCODE_TV

TV key.

On TV remotes, switches to viewing live TV.

AKEYCODE_TV_ANTENNA_CABLE

Antenna/Cable key.

Toggles broadcast input source between antenna and cable.

AKEYCODE_TV_AUDIO_DESCRIPTION

Audio description key.

Toggles audio description off / on.

AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN

Audio description mixing volume down key.

Lessen audio description volume as compared with normal audio volume.

AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP

Audio description mixing volume up key.

Louden audio description volume as compared with normal audio volume.

AKEYCODE_TV_CONTENTS_MENU

Contents menu key.

Goes to the title list. Corresponds to Contents Menu (0x0B) of CEC User Control Code

AKEYCODE_TV_DATA_SERVICE

TV data service key.

Displays data services like weather, sports.

AKEYCODE_TV_INPUT

TV input key.

On TV remotes, switches the input on a television screen.

AKEYCODE_TV_INPUT_COMPONENT_1

Component #1 key.

Switches to component video input #1.

AKEYCODE_TV_INPUT_COMPONENT_2

Component #2 key.

Switches to component video input #2.

AKEYCODE_TV_INPUT_COMPOSITE_1

Composite #1 key.

Switches to composite video input #1.

AKEYCODE_TV_INPUT_COMPOSITE_2

Composite #2 key.

Switches to composite video input #2.

AKEYCODE_TV_INPUT_HDMI_1

HDMI #1 key.

Switches to HDMI input #1.

AKEYCODE_TV_INPUT_HDMI_2

HDMI #2 key.

Switches to HDMI input #2.

AKEYCODE_TV_INPUT_HDMI_3

HDMI #3 key.

Switches to HDMI input #3.

AKEYCODE_TV_INPUT_HDMI_4

HDMI #4 key.

Switches to HDMI input #4.

AKEYCODE_TV_INPUT_VGA_1

VGA #1 key.

Switches to VGA (analog RGB) input #1.

AKEYCODE_TV_MEDIA_CONTEXT_MENU

Media context menu key.

Goes to the context menu of media contents. Corresponds to Media Context-sensitive Menu (0x11) of CEC User Control Code.

AKEYCODE_TV_NETWORK

Toggle Network key.

Toggles selecting broacast services.

AKEYCODE_TV_NUMBER_ENTRY

Number entry key.

Initiates to enter multi-digit channel nubmber when each digit key is assigned for selecting separate channel. Corresponds to Number Entry Mode (0x1D) of CEC User Control Code.

AKEYCODE_TV_POWER

TV power key.

On TV remotes, toggles the power on a television screen.

AKEYCODE_TV_RADIO_SERVICE

Radio key.

Toggles TV service / Radio service.

AKEYCODE_TV_SATELLITE

Satellite key.

Switches to digital satellite broadcast service.

AKEYCODE_TV_SATELLITE_BS

BS key.

Switches to BS digital satellite broadcasting service available in Japan.

AKEYCODE_TV_SATELLITE_CS

CS key.

Switches to CS digital satellite broadcasting service available in Japan.

AKEYCODE_TV_SATELLITE_SERVICE

BS/CS key.

Toggles between BS and CS digital satellite services.

AKEYCODE_TV_TELETEXT

Teletext key.

Displays Teletext service.

AKEYCODE_TV_TERRESTRIAL_ANALOG

Analog Terrestrial key.

Switches to analog terrestrial broadcast service.

AKEYCODE_TV_TERRESTRIAL_DIGITAL

Digital Terrestrial key.

Switches to digital terrestrial broadcast service.

AKEYCODE_TV_TIMER_PROGRAMMING

Timer programming key.

Goes to the timer recording menu. Corresponds to Timer Programming (0x54) of CEC User Control Code.

AKEYCODE_TV_ZOOM_MODE

Zoom mode key.

Changes Zoom mode (Normal, Full, Zoom, Wide-zoom, etc.)

AKEYCODE_U

'U' key.

AKEYCODE_UNKNOWN

Unknown key code.

AKEYCODE_V

'V' key.

AKEYCODE_VIDEO_APP_1

Video Application key #1.

AKEYCODE_VIDEO_APP_2

Video Application key #2.

AKEYCODE_VIDEO_APP_3

Video Application key #3.

AKEYCODE_VIDEO_APP_4

Video Application key #4.

AKEYCODE_VIDEO_APP_5

Video Application key #5.

AKEYCODE_VIDEO_APP_6

Video Application key #6.

AKEYCODE_VIDEO_APP_7

Video Application key #7.

AKEYCODE_VIDEO_APP_8

Video Application key #8.

AKEYCODE_VOICE_ASSIST

Voice Assist key.

Launches the global voice assist activity. Not delivered to applications.

AKEYCODE_VOLUME_DOWN

Volume Down key.

Adjusts the speaker volume down.

AKEYCODE_VOLUME_MUTE

Volume Mute key.

Mutes the speaker, unlike AKEYCODE_MUTE. This key should normally be implemented as a toggle such that the first press mutes the speaker and the second press restores the original volume.

AKEYCODE_VOLUME_UP

Volume Up key.

Adjusts the speaker volume up.

AKEYCODE_W

'W' key.

AKEYCODE_WAKEUP

Wakeup key.

Wakes up the device. Behaves somewhat like AKEYCODE_POWER but it has no effect if the device is already awake.

AKEYCODE_WINDOW

Window key.

On TV remotes, toggles picture-in-picture mode or other windowing functions.

AKEYCODE_X

'X' key.

AKEYCODE_Y

'Y' key.

AKEYCODE_YEN

Japanese Yen key.

AKEYCODE_Z

'Z' key.

AKEYCODE_ZENKAKU_HANKAKU

Japanese full-width / half-width key.

AKEYCODE_ZOOM_IN

Zoom in key.

AKEYCODE_ZOOM_OUT

Zoom out key.

AMotionClassification

Declared in android/input.h
 AMotionClassification

Constants that identify different gesture classification types.

Properties
AMOTION_EVENT_CLASSIFICATION_AMBIGUOUS_GESTURE

Classification constant: Ambiguous gesture.

The user's intent with respect to the current event stream is not yet determined. Events starting in AMOTION_EVENT_CLASSIFICATION_AMBIGUOUS_GESTURE will eventually resolve into either AMOTION_EVENT_CLASSIFICATION_DEEP_PRESS or AMOTION_EVENT_CLASSIFICATION_NONE. Gestural actions, such as scrolling, should be inhibited until the classification resolves to another value or the event stream ends.

AMOTION_EVENT_CLASSIFICATION_DEEP_PRESS

Classification constant: Deep press.

The current event stream represents the user intentionally pressing harder on the screen. This classification type should be used to accelerate the long press behaviour.

AMOTION_EVENT_CLASSIFICATION_MULTI_FINGER_SWIPE

Classification constant: multi-finger swipe.

The current event stream represents the user swiping with three or more fingers on a touchpad. Unlike two-finger swipes, these are only to be handled by the system UI, which is why they have a separate constant from two-finger swipes.

AMOTION_EVENT_CLASSIFICATION_NONE

Classification constant: None.

No additional information is available about the current motion event stream.

AMOTION_EVENT_CLASSIFICATION_PINCH

Classification constant: pinch.

The current event stream represents the user pinching with two fingers on a touchpad. The gesture is centered around the current cursor position.

AMOTION_EVENT_CLASSIFICATION_TWO_FINGER_SWIPE

Classification constant: touchpad two-finger swipe.

The current event stream represents the user swiping with two fingers on a touchpad.

Typedefs

AInputEvent

Declared in android/input.h
struct AInputEvent AInputEvent

Input events.

Input events are opaque structures. Use the provided accessors functions to read their properties.

AInputQueue

Declared in android/input.h
struct AInputQueue AInputQueue

Input queue.

An input queue is the facility through which you retrieve input events.

Functions

AInputEvent_getDeviceId

Declared in android/input.h
int32_t AInputEvent_getDeviceId(
  const AInputEvent *event
)

Get the id for the device that an input event came from.

Input events can be generated by multiple different input devices. Use the input device id to obtain information about the input device that was responsible for generating a particular event.

An input device id of 0 indicates that the event didn't come from a physical device; other numbers are arbitrary and you shouldn't depend on the values. Use the provided input device query API to obtain information about input devices.

AInputEvent_getSource

Declared in android/input.h
int32_t AInputEvent_getSource(
  const AInputEvent *event
)

Get the input event source.

AInputEvent_getType

Declared in android/input.h
int32_t AInputEvent_getType(
  const AInputEvent *event
)

Input event accessors.

Note that most functions can only be used on input events that are of a given type. Calling these functions on input events of other types will yield undefined behavior.Get the input event type.

AInputEvent_release

Declared in android/input.h
void AInputEvent_release(
  const AInputEvent *event
)

Releases interface objects created by AKeyEvent_fromJava() and AMotionEvent_fromJava().

After returning, the specified AInputEvent* object becomes invalid and should no longer be used. The underlying Java object remains valid and does not change its state.

Available since API level 31.

AInputEvent_toJava

Declared in android/input.h
jobject AInputEvent_toJava(
  JNIEnv *env,
  const AInputEvent *aInputEvent
)

Creates a java android.view.InputEvent object that is a copy of the specified native AInputEvent.

Specified AInputEvent is require to be a valid MotionEvent or KeyEvent object.

Available since API level 35.

AInputQueue_attachLooper

Declared in android/input.h
void AInputQueue_attachLooper(
  AInputQueue *queue,
  ALooper *looper,
  int ident,
  ALooper_callbackFunc callback,
  void *data
)

Add this input queue to a looper for processing.

See ALooper_addFd() for information on the ident, callback, and data params.

AInputQueue_detachLooper

Declared in android/input.h
void AInputQueue_detachLooper(
  AInputQueue *queue
)

Remove the input queue from the looper it is currently attached to.

AInputQueue_finishEvent

Declared in android/input.h
void AInputQueue_finishEvent(
  AInputQueue *queue,
  AInputEvent *event,
  int handled
)

Report that dispatching has finished with the given event.

This must be called after receiving an event with AInputQueue_getEvent().

AInputQueue_fromJava

Declared in android/input.h
AInputQueue * AInputQueue_fromJava(
  JNIEnv *env,
  jobject inputQueue
)

Returns the AInputQueue* object associated with the supplied Java InputQueue object.

The returned native object holds a weak reference to the Java object, and is only valid as long as the Java object has not yet been disposed. You should ensure that there is a strong reference to the Java object and that it has not been disposed before using the returned object.

Available since API level 33.

AInputQueue_getEvent

Declared in android/input.h
int32_t AInputQueue_getEvent(
  AInputQueue *queue,
  AInputEvent **outEvent
)

Returns the next available event from the queue.

Returns a negative value if no events are available or an error has occurred.

AInputQueue_hasEvents

Declared in android/input.h
int32_t AInputQueue_hasEvents(
  AInputQueue *queue
)

Returns true if there are one or more events available in the input queue.

Returns 1 if the queue has events; 0 if it does not have events; and a negative value if there is an error.

AInputQueue_preDispatchEvent

Declared in android/input.h
int32_t AInputQueue_preDispatchEvent(
  AInputQueue *queue,
  AInputEvent *event
)

Sends the key for standard pre-dispatching that is, possibly deliver it to the current IME to be consumed before the app.

Returns 0 if it was not pre-dispatched, meaning you can process it right now. If non-zero is returned, you must abandon the current event processing and allow the event to appear again in the event queue (if it does not get consumed during pre-dispatching).

AKeyEvent_fromJava

Declared in android/input.h
const AInputEvent * AKeyEvent_fromJava(
  JNIEnv *env,
  jobject keyEvent
)

Creates a native AInputEvent* object that is a copy of the specified Java android.view.KeyEvent.

The result may be used with generic and KeyEvent-specific AInputEvent_* functions. The object returned by this function must be disposed using AInputEvent_release().

Available since API level 31.

AKeyEvent_getAction

Declared in android/input.h
int32_t AKeyEvent_getAction(
  const AInputEvent *key_event
)

Get the key event action.

AKeyEvent_getDownTime

Declared in android/input.h
int64_t AKeyEvent_getDownTime(
  const AInputEvent *key_event
)

Get the time of the most recent key down event, in the java.lang.System.nanoTime() time base.

If this is a down event, this will be the same as eventTime. Note that when chording keys, this value is the down time of the most recently pressed key, which may not be the same physical key of this event.

AKeyEvent_getEventTime

Declared in android/input.h
int64_t AKeyEvent_getEventTime(
  const AInputEvent *key_event
)

Get the time this event occurred, in the java.lang.System.nanoTime() time base.

AKeyEvent_getFlags

Declared in android/input.h
int32_t AKeyEvent_getFlags(
  const AInputEvent *key_event
)

Get the key event flags.

AKeyEvent_getKeyCode

Declared in android/input.h
int32_t AKeyEvent_getKeyCode(
  const AInputEvent *key_event
)

Get the key code of the key event.

This is the physical key that was pressed, not the Unicode character.

AKeyEvent_getMetaState

Declared in android/input.h
int32_t AKeyEvent_getMetaState(
  const AInputEvent *key_event
)

Get the meta key state.

AKeyEvent_getRepeatCount

Declared in android/input.h
int32_t AKeyEvent_getRepeatCount(
  const AInputEvent *key_event
)

Get the repeat count of the event.

For both key up an key down events, this is the number of times the key has repeated with the first down starting at 0 and counting up from there. For multiple key events, this is the number of down/up pairs that have occurred.

AKeyEvent_getScanCode

Declared in android/input.h
int32_t AKeyEvent_getScanCode(
  const AInputEvent *key_event
)

Get the hardware key id of this key event.

These values are not reliable and vary from device to device.

AMotionEvent_fromJava

Declared in android/input.h
const AInputEvent * AMotionEvent_fromJava(
  JNIEnv *env,
  jobject motionEvent
)

Creates a native AInputEvent* object that is a copy of the specified Java android.view.MotionEvent.

The result may be used with generic and MotionEvent-specific AInputEvent_* functions. The object returned by this function must be disposed using AInputEvent_release().

Available since API level 31.

AMotionEvent_getAction

Declared in android/input.h
int32_t AMotionEvent_getAction(
  const AInputEvent *motion_event
)

Get the combined motion event action code and pointer index.

AMotionEvent_getActionButton

Declared in android/input.h
int32_t AMotionEvent_getActionButton(
  const AInputEvent *motion_event
)

Get the action button for the motion event.

Returns a valid action button when the event is associated with a button press or button release action. For other actions the return value is undefined.

See also:AMOTION_EVENT_BUTTON_PRIMARYSee also:AMOTION_EVENT_BUTTON_SECONDARYSee also:AMOTION_EVENT_BUTTON_TERTIARYSee also:AMOTION_EVENT_BUTTON_BACKSee also:AMOTION_EVENT_BUTTON_FORWARDSee also:#AMOTION_EVENT_BUTTON_STYLUS_PRIMARY See also:#AMOTION_EVENT_BUTTON_STYLUS_SECONDARY

AMotionEvent_getAxisValue

Declared in android/input.h
float AMotionEvent_getAxisValue(
  const AInputEvent *motion_event,
  int32_t axis,
  size_t pointer_index
)

Get the value of the request axis for the given pointer index.

AMotionEvent_getButtonState

Declared in android/input.h
int32_t AMotionEvent_getButtonState(
  const AInputEvent *motion_event
)

Get the button state of all buttons that are pressed.

AMotionEvent_getClassification

Declared in android/input.h
int32_t AMotionEvent_getClassification(
  const AInputEvent *motion_event
)

Returns the classification for the current gesture.

The classification may change as more events become available for the same gesture.

See also: AMOTION_EVENT_CLASSIFICATION_NONE See also: AMOTION_EVENT_CLASSIFICATION_AMBIGUOUS_GESTURE See also: AMOTION_EVENT_CLASSIFICATION_DEEP_PRESS

AMotionEvent_getDownTime

Declared in android/input.h
int64_t AMotionEvent_getDownTime(
  const AInputEvent *motion_event
)

Get the time when the user originally pressed down to start a stream of position events, in the java.lang.System.nanoTime() time base.

AMotionEvent_getEdgeFlags

Declared in android/input.h
int32_t AMotionEvent_getEdgeFlags(
  const AInputEvent *motion_event
)

Get a bitfield indicating which edges, if any, were touched by this motion event.

For touch events, clients can use this to determine if the user's finger was touching the edge of the display.

AMotionEvent_getEventTime

Declared in android/input.h
int64_t AMotionEvent_getEventTime(
  const AInputEvent *motion_event
)

Get the time when this specific event was generated, in the java.lang.System.nanoTime() time base.

AMotionEvent_getFlags

Declared in android/input.h
int32_t AMotionEvent_getFlags(
  const AInputEvent *motion_event
)

Get the motion event flags.

AMotionEvent_getHistoricalAxisValue

Declared in android/input.h
float AMotionEvent_getHistoricalAxisValue(
  const AInputEvent *motion_event,
  int32_t axis,
  size_t pointer_index,
  size_t history_index
)

Get the historical value of the request axis for the given pointer index that occurred between this event and the previous motion event.

AMotionEvent_getHistoricalEventTime

Declared in android/input.h
int64_t AMotionEvent_getHistoricalEventTime(
  const AInputEvent *motion_event,
  size_t history_index
)

Get the time that a historical movement occurred between this event and the previous event, in the java.lang.System.nanoTime() time base.

AMotionEvent_getHistoricalOrientation

Declared in android/input.h
float AMotionEvent_getHistoricalOrientation(
  const AInputEvent *motion_event,
  size_t pointer_index,
  size_t history_index
)

Get the historical orientation of the touch area and tool area in radians clockwise from vertical for the given pointer index that occurred between this event and the previous motion event.

An angle of 0 degrees indicates that the major axis of contact is oriented upwards, is perfectly circular or is of unknown orientation. A positive angle indicates that the major axis of contact is oriented to the right. A negative angle indicates that the major axis of contact is oriented to the left. The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians (finger pointing fully right).

AMotionEvent_getHistoricalPressure

Declared in android/input.h
float AMotionEvent_getHistoricalPressure(
  const AInputEvent *motion_event,
  size_t pointer_index,
  size_t history_index
)

Get the historical pressure of this event for the given pointer index that occurred between this event and the previous motion event.

The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure), although values higher than 1 may be generated depending on the calibration of the input device.

AMotionEvent_getHistoricalRawX

Declared in android/input.h
float AMotionEvent_getHistoricalRawX(
  const AInputEvent *motion_event,
  size_t pointer_index,
  size_t history_index
)

Get the historical raw X coordinate of this event for the given pointer index that occurred between this event and the previous motion event.

For touch events on the screen, this is the original location of the event on the screen, before it had been adjusted for the containing window and views. Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise.

AMotionEvent_getHistoricalRawY

Declared in android/input.h
float AMotionEvent_getHistoricalRawY(
  const AInputEvent *motion_event,
  size_t pointer_index,
  size_t history_index
)

Get the historical raw Y coordinate of this event for the given pointer index that occurred between this event and the previous motion event.

For touch events on the screen, this is the original location of the event on the screen, before it had been adjusted for the containing window and views. Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise.

AMotionEvent_getHistoricalSize

Declared in android/input.h
float AMotionEvent_getHistoricalSize(
  const AInputEvent *motion_event,
  size_t pointer_index,
  size_t history_index
)

Get the current scaled value of the approximate size for the given pointer index that occurred between this event and the previous motion event.

This represents some approximation of the area of the screen being pressed; the actual value in pixels corresponding to the touch is normalized with the device specific range of values and scaled to a value between 0 and 1. The value of size can be used to determine fat touch events.

AMotionEvent_getHistoricalToolMajor

Declared in android/input.h
float AMotionEvent_getHistoricalToolMajor(
  const AInputEvent *motion_event,
  size_t pointer_index,
  size_t history_index
)

Get the historical length of the major axis of an ellipse that describes the size of the approaching tool for the given pointer index that occurred between this event and the previous motion event.

The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact.

AMotionEvent_getHistoricalToolMinor

Declared in android/input.h
float AMotionEvent_getHistoricalToolMinor(
  const AInputEvent *motion_event,
  size_t pointer_index,
  size_t history_index
)

Get the historical length of the minor axis of an ellipse that describes the size of the approaching tool for the given pointer index that occurred between this event and the previous motion event.

The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact.

AMotionEvent_getHistoricalTouchMajor

Declared in android/input.h
float AMotionEvent_getHistoricalTouchMajor(
  const AInputEvent *motion_event,
  size_t pointer_index,
  size_t history_index
)

Get the historical length of the major axis of an ellipse that describes the touch area at the point of contact for the given pointer index that occurred between this event and the previous motion event.

AMotionEvent_getHistoricalTouchMinor

Declared in android/input.h
float AMotionEvent_getHistoricalTouchMinor(
  const AInputEvent *motion_event,
  size_t pointer_index,
  size_t history_index
)

Get the historical length of the minor axis of an ellipse that describes the touch area at the point of contact for the given pointer index that occurred between this event and the previous motion event.

AMotionEvent_getHistoricalX

Declared in android/input.h
float AMotionEvent_getHistoricalX(
  const AInputEvent *motion_event,
  size_t pointer_index,
  size_t history_index
)

Get the historical X coordinate of this event for the given pointer index that occurred between this event and the previous motion event.

Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise.

AMotionEvent_getHistoricalY

Declared in android/input.h
float AMotionEvent_getHistoricalY(
  const AInputEvent *motion_event,
  size_t pointer_index,
  size_t history_index
)

Get the historical Y coordinate of this event for the given pointer index that occurred between this event and the previous motion event.

Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise.

AMotionEvent_getHistorySize

Declared in android/input.h
size_t AMotionEvent_getHistorySize(
  const AInputEvent *motion_event
)

Get the number of historical points in this event.

These are movements that have occurred between this event and the previous event. This only applies to AMOTION_EVENT_ACTION_MOVE events all other actions will have a size of 0. Historical samples are indexed from oldest to newest.

AMotionEvent_getMetaState

Declared in android/input.h
int32_t AMotionEvent_getMetaState(
  const AInputEvent *motion_event
)

Get the state of any meta / modifier keys that were in effect when the event was generated.

AMotionEvent_getOrientation

Declared in android/input.h
float AMotionEvent_getOrientation(
  const AInputEvent *motion_event,
  size_t pointer_index
)

Get the current orientation of the touch area and tool area in radians clockwise from vertical for the given pointer index.

An angle of 0 degrees indicates that the major axis of contact is oriented upwards, is perfectly circular or is of unknown orientation. A positive angle indicates that the major axis of contact is oriented to the right. A negative angle indicates that the major axis of contact is oriented to the left. The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians (finger pointing fully right).

AMotionEvent_getPointerCount

Declared in android/input.h
size_t AMotionEvent_getPointerCount(
  const AInputEvent *motion_event
)

Get the number of pointers of data contained in this event.

Always >= 1.

AMotionEvent_getPointerId

Declared in android/input.h
int32_t AMotionEvent_getPointerId(
  const AInputEvent *motion_event,
  size_t pointer_index
)

Get the pointer identifier associated with a particular pointer data index in this event.

The identifier tells you the actual pointer number associated with the data, accounting for individual pointers going up and down since the start of the current gesture.

AMotionEvent_getPressure

Declared in android/input.h
float AMotionEvent_getPressure(
  const AInputEvent *motion_event,
  size_t pointer_index
)

Get the current pressure of this event for the given pointer index.

The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure), although values higher than 1 may be generated depending on the calibration of the input device.

AMotionEvent_getRawX

Declared in android/input.h
float AMotionEvent_getRawX(
  const AInputEvent *motion_event,
  size_t pointer_index
)

Get the original raw X coordinate of this event.

For touch events on the screen, this is the original location of the event on the screen, before it had been adjusted for the containing window and views.

AMotionEvent_getRawY

Declared in android/input.h
float AMotionEvent_getRawY(
  const AInputEvent *motion_event,
  size_t pointer_index
)

Get the original raw X coordinate of this event.

For touch events on the screen, this is the original location of the event on the screen, before it had been adjusted for the containing window and views.

AMotionEvent_getSize

Declared in android/input.h
float AMotionEvent_getSize(
  const AInputEvent *motion_event,
  size_t pointer_index
)

Get the current scaled value of the approximate size for the given pointer index.

This represents some approximation of the area of the screen being pressed; the actual value in pixels corresponding to the touch is normalized with the device specific range of values and scaled to a value between 0 and 1. The value of size can be used to determine fat touch events.

AMotionEvent_getToolMajor

Declared in android/input.h
float AMotionEvent_getToolMajor(
  const AInputEvent *motion_event,
  size_t pointer_index
)

Get the current length of the major axis of an ellipse that describes the size of the approaching tool for the given pointer index.

The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact.

AMotionEvent_getToolMinor

Declared in android/input.h
float AMotionEvent_getToolMinor(
  const AInputEvent *motion_event,
  size_t pointer_index
)

Get the current length of the minor axis of an ellipse that describes the size of the approaching tool for the given pointer index.

The tool area represents the estimated size of the finger or pen that is touching the device independent of its actual touch area at the point of contact.

AMotionEvent_getToolType

Declared in android/input.h
int32_t AMotionEvent_getToolType(
  const AInputEvent *motion_event,
  size_t pointer_index
)

Get the tool type of a pointer for the given pointer index.

The tool type indicates the type of tool used to make contact such as a finger or stylus, if known.

AMotionEvent_getTouchMajor

Declared in android/input.h
float AMotionEvent_getTouchMajor(
  const AInputEvent *motion_event,
  size_t pointer_index
)

Get the current length of the major axis of an ellipse that describes the touch area at the point of contact for the given pointer index.

AMotionEvent_getTouchMinor

Declared in android/input.h
float AMotionEvent_getTouchMinor(
  const AInputEvent *motion_event,
  size_t pointer_index
)

Get the current length of the minor axis of an ellipse that describes the touch area at the point of contact for the given pointer index.

AMotionEvent_getX

Declared in android/input.h
float AMotionEvent_getX(
  const AInputEvent *motion_event,
  size_t pointer_index
)

Get the current X coordinate of this event for the given pointer index.

Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise.

AMotionEvent_getXOffset

Declared in android/input.h
float AMotionEvent_getXOffset(
  const AInputEvent *motion_event
)

Get the X coordinate offset.

For touch events on the screen, this is the delta that was added to the raw screen coordinates to adjust for the absolute position of the containing windows and views.

AMotionEvent_getXPrecision

Declared in android/input.h
float AMotionEvent_getXPrecision(
  const AInputEvent *motion_event
)

Get the precision of the X coordinates being reported.

You can multiply this number with an X coordinate sample to find the actual hardware value of the X coordinate.

AMotionEvent_getY

Declared in android/input.h
float AMotionEvent_getY(
  const AInputEvent *motion_event,
  size_t pointer_index
)

Get the current Y coordinate of this event for the given pointer index.

Whole numbers are pixels; the value may have a fraction for input devices that are sub-pixel precise.

AMotionEvent_getYOffset

Declared in android/input.h
float AMotionEvent_getYOffset(
  const AInputEvent *motion_event
)

Get the Y coordinate offset.

For touch events on the screen, this is the delta that was added to the raw screen coordinates to adjust for the absolute position of the containing windows and views.

AMotionEvent_getYPrecision

Declared in android/input.h
float AMotionEvent_getYPrecision(
  const AInputEvent *motion_event
)

Get the precision of the Y coordinates being reported.

You can multiply this number with a Y coordinate sample to find the actual hardware value of the Y coordinate.