public abstract class

InputEvent

extends Object
implements Parcelable
java.lang.Object
   ↳ android.view.InputEvent
Known Direct Subclasses

Class Overview

Common base class for input events.

Summary

Constants
Creator<InputEvent> CREATOR
[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Methods
int describeContents()
Describe the kinds of special objects contained in this Parcelable's marshalled representation.
final InputDevice getDevice()
Gets the device that this event came from.
final int getDeviceId()
Gets the id for the device that this event came from.
final int getSource()
Gets the source of the event.
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final Creator<InputEvent> CREATOR

Since: API Level 9

Public Methods

public int describeContents ()

Since: API Level 1

Describe the kinds of special objects contained in this Parcelable's marshalled representation.

Returns
  • a bitmask indicating the set of special object types marshalled by the Parcelable.

public final InputDevice getDevice ()

Since: API Level 9

Gets the device that this event came from.

Returns
  • The device, or null if unknown.

public final int getDeviceId ()

Since: API Level 1

Gets the id for the device that this event came from. An id of zero indicates that the event didn't come from a physical device and maps to the default keymap. The other numbers are arbitrary and you shouldn't depend on the values.

Returns
  • The device id.
See Also

public final int getSource ()

Since: API Level 9

Gets the source of the event.

Returns