InputDevice

Class of android.view · InputDevice.java · Android's reference

public final class InputDevice

An input device: the window's mouse and keyboard, as a touchscreen and a keyboard.

Nested types

Fields

public static final int SOURCE_CLASS_MASK = 0xff source
public static final int SOURCE_CLASS_NONE = 0 source
public static final int SOURCE_CLASS_BUTTON = 1 source
public static final int SOURCE_CLASS_POINTER = 2 source
public static final int SOURCE_CLASS_TRACKBALL = 4 source
public static final int SOURCE_CLASS_POSITION = 8 source
public static final int SOURCE_CLASS_JOYSTICK = 16 source
public static final int SOURCE_UNKNOWN = 0 source
public static final int SOURCE_KEYBOARD = 0x101 source
public static final int SOURCE_DPAD = 0x201 source
public static final int SOURCE_GAMEPAD = 0x401 source
public static final int SOURCE_TOUCHSCREEN = 0x1002 source
public static final int SOURCE_MOUSE = 0x2002 source
public static final int SOURCE_STYLUS = 0x4002 source
public static final int SOURCE_TRACKBALL = 0x10004 source
public static final int SOURCE_MOUSE_RELATIVE = 0x20004 source
public static final int SOURCE_TOUCHPAD = 0x100008 source
public static final int SOURCE_JOYSTICK = 0x1000010 source
public static final int SOURCE_ROTARY_ENCODER = 0x400000 source
public static final int SOURCE_ANY = 0xffffff00 source
public static final int KEYBOARD_TYPE_NONE = 0 source
public static final int KEYBOARD_TYPE_NON_ALPHABETIC = 1 source
public static final int KEYBOARD_TYPE_ALPHABETIC = 2 source

Methods

public static InputDevice getDevice(int id) source
public static int[] getDeviceIds() source
public int getId() source
public String getName() source
public int getSources() source
public boolean supportsSource(int source) source
public int getKeyboardType() source
public KeyCharacterMap getKeyCharacterMap() source
public boolean isVirtual() source
public boolean isExternal() source
public boolean isEnabled() source
public int getVendorId() source
public int getProductId() source
public String getDescriptor() source
public boolean[] hasKeys(int... keys) source
public int getControllerNumber() source

a gamepad's player number: none of these is one

public java.util.List<MotionRange> getMotionRanges() source

the touchscreen's axes: x and y over the display, pressure and size from 0 to 1

public MotionRange getMotionRange(int axis) source
public MotionRange getMotionRange(int axis, int source) source
public android.os.Vibrator getVibrator() source
public android.os.VibratorManager getVibratorManager() source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.