Android Guides | Samples

Android.Views.InputSourceType Enumeration

Enumerates values returned by several types and taken as a parameter of several types.

Syntax

public enum InputSourceType

Remarks

Members

Member NameDescription
AnyA special input source constant that is used when filtering input devices to match devices that provide any type of input source.
ClassButtonThe input source has buttons or keys. Examples: InputDevice.SourceKeyboard, InputDevice.SourceDpad. A KeyEvent should be interpreted as a button or key press. Use InputDevice.KeyCharacterMap to query the device's button and key mappings.
ClassJoystickThe input source is a joystick. A MotionEvent should be interpreted as absolute joystick movements. Use InputDevice.GetMotionRange(Axis) to query the range of positions.
ClassMaskA 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.
ClassNoneThe input source has no class. It is up to the application to determine how to handle the device based on the device type.
ClassPointerThe input source is a pointing device associated with a display. Examples: InputDevice.SourceTouchscreen, InputDevice.SourceMouse. A MotionEvent should be interpreted as absolute coordinates in display units according to the View hierarchy. Pointer down/up indicated when the finger touches the display or when the selection button is pressed/released. Use InputDevice.GetMotionRange(Axis) 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.
ClassPositionThe input source is an absolute positioning device not associated with a display (unlike InputDevice.SourceClassPointer). A MotionEvent should be interpreted as absolute coordinates in device-specific surface units. Use InputDevice.GetMotionRange(Axis) to query the range of positions.
ClassTrackballThe input source is a trackball navigation device. Examples: InputDevice.SourceTrackball. A 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 InputDevice.GetMotionRange(Axis) to query the range of motion.
DpadThe input source is a DPad.
GamepadThe input source is a game pad. (It may also be a InputDevice.SourceJoystick).
Hdmi
JoystickThe input source is a joystick. (It may also be a InputDevice.SourceGamepad).
KeyboardThe input source is a keyboard. This source indicates pretty much anything that has buttons. Use InputDevice.KeyboardType to determine whether the keyboard has alphabetic keys and can be used to enter text.
MouseThe input source is a mouse pointing device. This code is also used for other mouse-like pointing devices such as trackpads and trackpoints.
Stylus

The input source is a stylus pointing device.

Note that this bit merely indicates that an input device is capable of obtaining input from a stylus. To determine whether a given touch event was produced by a stylus, examine the tool type returned by MotionEvent.GetToolType(Int32) for each individual pointer.

A single touch event may multiple pointers with different tool types, such as an event that has one pointer with tool type MotionEvent.ToolTypeFinger and another pointer with tool type MotionEvent.ToolTypeStylus. So it is important to examine the tool type of each pointer, regardless of the source reported by MotionEvent.Source.

TouchNavigationThe input source is a touch device whose motions should be interpreted as navigation events. For example, an upward swipe should be as an upward focus traversal in the same manner as pressing up on a D-Pad would be. Swipes to the left, right and down should be treated in a similar manner.
TouchpadThe input source is a touch pad or digitizer tablet that is not associated with a display (unlike InputDevice.SourceTouchscreen).
TouchscreenThe input source is a touch screen pointing device.
TrackballThe input source is a trackball.
UnknownThe input source is unknown.

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0

The members of Android.Views.InputSourceType are listed below.

See Also: Enum

Public Fields

AnyInputSourceType. A special input source constant that is used when filtering input devices to match devices that provide any type of input source.
ClassButtonInputSourceType. The input source has buttons or keys. Examples: InputDevice.SourceKeyboard, InputDevice.SourceDpad. A KeyEvent should be interpreted as a button or key press. Use InputDevice.KeyCharacterMap to query the device's button and key mappings.
ClassJoystickInputSourceType. The input source is a joystick. A MotionEvent should be interpreted as absolute joystick movements. Use InputDevice.GetMotionRange(Axis) to query the range of positions.
ClassMaskInputSourceType. 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.
ClassNoneInputSourceType. The input source has no class. It is up to the application to determine how to handle the device based on the device type.
ClassPointerInputSourceType. The input source is a pointing device associated with a display. Examples: InputDevice.SourceTouchscreen, InputDevice.SourceMouse. A MotionEvent should be interpreted as absolute coordinates in display units according to the View hierarchy. Pointer down/up indicated when the finger touches the display or when the selection button is pressed/released. Use InputDevice.GetMotionRange(Axis) 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.
ClassPositionInputSourceType. The input source is an absolute positioning device not associated with a display (unlike InputDevice.SourceClassPointer). A MotionEvent should be interpreted as absolute coordinates in device-specific surface units. Use InputDevice.GetMotionRange(Axis) to query the range of positions.
ClassTrackballInputSourceType. The input source is a trackball navigation device. Examples: InputDevice.SourceTrackball. A 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 InputDevice.GetMotionRange(Axis) to query the range of motion.
DpadInputSourceType. The input source is a DPad.
GamepadInputSourceType. The input source is a game pad. (It may also be a InputDevice.SourceJoystick).
HdmiInputSourceType.
JoystickInputSourceType. The input source is a joystick. (It may also be a InputDevice.SourceGamepad).
KeyboardInputSourceType. The input source is a keyboard. This source indicates pretty much anything that has buttons. Use InputDevice.KeyboardType to determine whether the keyboard has alphabetic keys and can be used to enter text.
MouseInputSourceType. The input source is a mouse pointing device. This code is also used for other mouse-like pointing devices such as trackpads and trackpoints.
StylusInputSourceType.

The input source is a stylus pointing device.

Note that this bit merely indicates that an input device is capable of obtaining input from a stylus. To determine whether a given touch event was produced by a stylus, examine the tool type returned by MotionEvent.GetToolType(Int32) for each individual pointer.

A single touch event may multiple pointers with different tool types, such as an event that has one pointer with tool type MotionEvent.ToolTypeFinger and another pointer with tool type MotionEvent.ToolTypeStylus. So it is important to examine the tool type of each pointer, regardless of the source reported by MotionEvent.Source.

TouchNavigationInputSourceType. The input source is a touch device whose motions should be interpreted as navigation events. For example, an upward swipe should be as an upward focus traversal in the same manner as pressing up on a D-Pad would be. Swipes to the left, right and down should be treated in a similar manner.
TouchpadInputSourceType. The input source is a touch pad or digitizer tablet that is not associated with a display (unlike InputDevice.SourceTouchscreen).
TouchscreenInputSourceType. The input source is a touch screen pointing device.
TrackballInputSourceType. The input source is a trackball.
UnknownInputSourceType. The input source is unknown.