InputEvent.Source


public static class InputEvent.Source


Specifies the source (e.g. hands, controller, head) of the input event.

Summary

Constants

static final int

Event is based on (one of) the user's controller(s).

static final int

Event is based on a mix of the head, eyes, and hands.

static final int

Event is based on one of the user's hands.

static final int

Event is based on the user's head.

static final int

Event is based on a 2D mouse pointing device.

static final int

Unknown source.

Public fields

static @NonNull InputEvent.Source

Constants

SOURCE_CONTROLLER

Added in 1.0.0-alpha05
public static final int SOURCE_CONTROLLER = 2

Event is based on (one of) the user's controller(s). Ray origin and direction are for a controller aim pose. Action state is based on the primary button on the controller, usually the bottom-most face button.

SOURCE_GAZE_AND_GESTURE

Added in 1.0.0-alpha05
public static final int SOURCE_GAZE_AND_GESTURE = 5

Event is based on a mix of the head, eyes, and hands. Ray origin is at average between eyes and points in direction based on a mix of eye gaze direction and hand motion. During a two-handed zoom/rotate gesture, left/right pointer events will be issued; otherwise, default events are issued based on the gaze ray. Action state is based on if the user has done a pinch gesture or not.

Events from this source are considered sensitive and hover events are never sent.

SOURCE_HANDS

Added in 1.0.0-alpha05
public static final int SOURCE_HANDS = 3

Event is based on one of the user's hands. Ray is a hand aim pose, with origin between thumb and forefinger and points in direction based on hand orientation. Action state is based on a pinch gesture.

SOURCE_HEAD

Added in 1.0.0-alpha05
public static final int SOURCE_HEAD = 1

Event is based on the user's head. Ray origin is at average between eyes, pushed out to the near clipping plane for both eyes and points in direction head is facing. Action state is based on volume up button being depressed.

Events from this source are considered sensitive and hover events are never sent.

SOURCE_MOUSE

Added in 1.0.0-alpha05
public static final int SOURCE_MOUSE = 4

Event is based on a 2D mouse pointing device. Ray origin behaves the same as for Source.SOURCE_HEAD and points in direction based on mouse movement. During a drag, the ray origin moves approximating hand motion. The scroll wheel moves the ray away from / towards the user. Action state is based on the primary mouse button.

SOURCE_UNKNOWN

Added in 1.0.0-alpha05
public static final int SOURCE_UNKNOWN = 0

Unknown source.

Public fields

INSTANCE

Added in 1.0.0-alpha05
public static @NonNull InputEvent.Source INSTANCE