InputEvent.Source


public final class InputEvent.Source


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

Summary

Public fields

static final @NonNull InputEvent.Source

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

static final @NonNull InputEvent.Source

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

static final @NonNull InputEvent.Source

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

static final @NonNull InputEvent.Source

Event is based on the user's head.

static final @NonNull InputEvent.Source

Event is based on a 2D mouse pointing device.

static final @NonNull InputEvent.Source

Unknown source.

Public methods

@NonNull String

Public fields

CONTROLLER

public static final @NonNull InputEvent.Source CONTROLLER

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.

GAZE_AND_GESTURE

public static final @NonNull InputEvent.Source GAZE_AND_GESTURE

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.

HANDS

public static final @NonNull InputEvent.Source HANDS

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.

HEAD

public static final @NonNull InputEvent.Source HEAD

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.

MOUSE

public static final @NonNull InputEvent.Source MOUSE

Event is based on a 2D mouse pointing device. Ray origin behaves the same as for 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.

UNKNOWN

public static final @NonNull InputEvent.Source UNKNOWN

Unknown source.

Public methods

toString

public @NonNull String toString()