最終更新:2012-11-23 (金) 20:49:24 (4170d)  

Android/タッチデバイス
Top / Android / タッチデバイス

http://source.android.com/tech/input/touch-devices.html

Single-touch devices use the following Linux input events:

  • ABS_X: (REQUIRED) Reports the X coordinate of the tool.
  • ABS_Y?: (REQUIRED) Reports the Y coordinate of the tool.
  • ABS_PRESSURE: (optional) Reports the physical pressure applied to the tip of the tool or the signal strength of the touch contact.
  • ABS_TOOL_WIDTH?: (optional) Reports the cross-sectional area or width of the touch contact or of the tool itself.
  • ABS_DISTANCE?: (optional) Reports the distance of the tool from the surface of the touch device.
  • ABS_TILT_X?: (optional) Reports the tilt of the tool from the surface of the touch device along the X axis.
  • ABS_TILT_Y?: (optional) Reports the tilt of the tool from the surface of the touch device along the Y axis.
  • BTN_TOUCH: (REQUIRED) Indicates whether the tool is touching the device.
  • BTN_LEFT, BTN_RIGHT?, BTN_MIDDLE?, BTN_BACK?, BTN_SIDE?, BTN_FORWARD?, BTN_EXTRA?, BTN_STYLUS?, BTN_STYLUS2?: (optional) Reports button states.
  • BTN_TOOL_FINGER?, BTN_TOOL_PEN, BTN_TOOL_RUBBER?, BTN_TOOL_BRUSH?, BTN_TOOL_PENCIL?, BTN_TOOL_AIRBRUSH?, BTN_TOOL_MOUSE?, BTN_TOOL_LENS?, BTN_TOOL_DOUBLETAP?, BTN_TOOL_TRIPLETAP?, BTN_TOOL_QUADTAP?: (optional) Reports the tool type.

Multi-touch devices use the following Linux input events:

  • ABS_MT_POSITION_X: (REQUIRED) Reports the X coordinate of the tool.
  • ABS_MT_POSITION_Y: (REQUIRED) Reports the Y coordinate of the tool.
  • ABS_MT_PRESSURE: (optional) Reports the physical pressure applied to the tip of the tool or the signal strength of the touch contact.
  • ABS_MT_TOUCH_MAJOR: (optional) Reports the cross-sectional area of the touch contact, or the length of the longer dimension of the touch contact.
  • ABS_MT_TOUCH_MINOR?: (optional) Reports the length of the shorter dimension of the touch contact. This axis should not be used if ABS_MT_TOUCH_MAJOR is reporting an area measurement.
  • ABS_MT_WIDTH_MAJOR?: (optional) Reports the cross-sectional area of the tool itself, or the length of the longer dimension of the tool itself. This axis should not be used if the dimensions of the tool itself are unknown.
  • ABS_MT_WIDTH_MINOR?: (optional) Reports the length of the shorter dimension of the tool itself. This axis should not be used if ABS_MT_WIDTH_MAJOR? is reporting an area measurement or if the dimensions of the tool itself are unknown.
  • ABS_MT_ORIENTATION?: (optional) Reports the orientation of the tool.
  • ABS_MT_DISTANCE?: (optional) Reports the distance of the tool from the surface of the touch device.
  • ABS_MT_TOOL_TYPE?: (optional) Reports the tool type as MT_TOOL_FINGER? or MT_TOOL_PEN?.
  • ABS_MT_TRACKING_ID: (optional) Reports the tracking id of the tool. The tracking id is an arbitrary non-negative integer that is used to identify and track each tool independently when multiple tools are active. For example, when multiple fingers are touching the device, each finger should be assigned a distinct tracking id that is used as long as the finger remains in contact. Tracking ids may be reused when their associated tools move out of range.
  • ABS_MT_SLOT: (optional) Reports the slot id of the tool, when using the Linux multi-touch protocol 'B'. Refer to the Linux multi-touch protocol documentation for more details.
  • BTN_TOUCH: (REQUIRED) Indicates whether the tool is touching the device.
  • BTN_LEFT, BTN_RIGHT?, BTN_MIDDLE?, BTN_BACK?, BTN_SIDE?, BTN_FORWARD?, BTN_EXTRA?, BTN_STYLUS?, BTN_STYLUS2?: (optional) Reports button states.
  • BTN_TOOL_FINGER?, BTN_TOOL_PEN, BTN_TOOL_RUBBER?, BTN_TOOL_BRUSH?, BTN_TOOL_PENCIL?, BTN_TOOL_AIRBRUSH?, BTN_TOOL_MOUSE?, BTN_TOOL_LENS?, BTN_TOOL_DOUBLETAP?, BTN_TOOL_TRIPLETAP?, BTN_TOOL_QUADTAP?: (optional) Reports the tool type.

メモ

  • The values reported by ABS_PRESSURE or ABS_MT_PRESSURE, if they are reported at all, must be non-zero when the tool is touching the device and zero otherwise to indicate that the tool is hovering.

関連