InputDeviceCompat
class InputDeviceCompat
kotlin.Any | |
↳ | androidx.core.view.InputDeviceCompat |
Helper class for accessing values in android.view.InputDevice
.
Summary
Constants | |
---|---|
static Int |
A special input source constant that is used when filtering input devices to match devices that provide any type of input source. |
static Int |
The input source has buttons or keys. |
static Int |
The input source is a joystick. |
static Int |
A mask for input source classes. |
static Int |
The input source has no class. |
static Int |
The input source is a pointing device associated with a display. |
static Int |
The input source is an absolute positioning device not associated with a display (unlike |
static Int |
The input source is a trackball navigation device. |
static Int |
The input source is a DPad. |
static Int |
The input source is a game pad. |
static Int |
The input source is a device connected through HDMI-based bus. |
static Int |
The input source is a joystick. |
static Int |
The input source is a keyboard. |
static Int |
The input source is a mouse pointing device. |
static Int |
The input source is a rotating encoder device whose motions should be interpreted as akin to those of a scroll wheel. |
static Int |
The input source is a stylus pointing device. |
static Int |
The input source is a touch pad or digitizer tablet that is not associated with a display (unlike |
static Int |
The input source is a touch screen pointing device. |
static Int |
The input source is a touch device whose motions should be interpreted as navigation events. |
static Int |
The input source is a trackball. |
static Int |
The input source is unknown. |
Constants
SOURCE_ANY
static val SOURCE_ANY: Int
A special input source constant that is used when filtering input devices to match devices that provide any type of input source.
Value: 0xffffff00
SOURCE_CLASS_BUTTON
static val SOURCE_CLASS_BUTTON: Int
The input source has buttons or keys. Examples: SOURCE_KEYBOARD
, SOURCE_DPAD
. A android.view.KeyEvent
should be interpreted as a button or key press.
Value: 0x00000001
SOURCE_CLASS_JOYSTICK
static val SOURCE_CLASS_JOYSTICK: Int
The input source is a joystick. A android.view.MotionEvent
should be interpreted as absolute joystick movements. Use android.view.InputDevice#getMotionRange to query the range of positions.
Value: 0x00000010
SOURCE_CLASS_MASK
static val SOURCE_CLASS_MASK: Int
A mask for input source classes. Each distinct input source constant has one or more input source class bits set to specify the desired interpretation for its input events.
Value: 0x000000ff
SOURCE_CLASS_NONE
static val SOURCE_CLASS_NONE: Int
The input source has no class. It is up to the application to determine how to handle the device based on the device type.
Value: 0x00000000
SOURCE_CLASS_POINTER
static val SOURCE_CLASS_POINTER: Int
The input source is a pointing device associated with a display. Examples: SOURCE_TOUCHSCREEN
, SOURCE_MOUSE
. A android.view.MotionEvent
should be interpreted as absolute coordinates in display units according to the android.view.View
hierarchy. Pointer down/up indicated when the finger touches the display or when the selection button is pressed/released. Use android.view.InputDevice#getMotionRange to query the range of the pointing device. Some devices permit touches outside the display area so the effective range may be somewhat smaller or larger than the actual display size.
Value: 0x00000002
SOURCE_CLASS_POSITION
static val SOURCE_CLASS_POSITION: Int
The input source is an absolute positioning device not associated with a display (unlike SOURCE_CLASS_POINTER
). A android.view.MotionEvent
should be interpreted as absolute coordinates in device-specific surface units. Use android.view.InputDevice#getMotionRange to query the range of positions.
Value: 0x00000008
SOURCE_CLASS_TRACKBALL
static val SOURCE_CLASS_TRACKBALL: Int
The input source is a trackball navigation device. Examples: SOURCE_TRACKBALL
. A android.view.MotionEvent
should be interpreted as relative movements in device-specific units used for navigation purposes. Pointer down/up indicates when the selection button is pressed/released. Use android.view.InputDevice#getMotionRange to query the range of motion.
Value: 0x00000004
SOURCE_DPAD
static val SOURCE_DPAD: Int
The input source is a DPad.
Value: 0x00000200 | SOURCE_CLASS_BUTTON
See Also
SOURCE_GAMEPAD
static val SOURCE_GAMEPAD: Int
The input source is a game pad. (It may also be a SOURCE_JOYSTICK
).
Value: 0x00000400 | SOURCE_CLASS_BUTTON
See Also
SOURCE_HDMI
static val SOURCE_HDMI: Int
The input source is a device connected through HDMI-based bus. The key comes in through HDMI-CEC or MHL signal line, and is treated as if it were generated by a locally connected DPAD or keyboard.
Value: 0x02000000 | SOURCE_CLASS_BUTTON
SOURCE_JOYSTICK
static val SOURCE_JOYSTICK: Int
The input source is a joystick. (It may also be a SOURCE_GAMEPAD
).
Value: 0x01000000 | SOURCE_CLASS_JOYSTICK
See Also