最終更新:2012-06-08 (金) 11:54:24 (4332d)
Digitizer Drivers for Windows Touch and Pen-Based Computers
Top / Digitizer Drivers for Windows Touch and Pen-Based Computers
http://msdn.microsoft.com/en-us/windows/hardware/gg487437.aspx
Contents
- Introduction
- Touch Digitizer Drivers
- Required and Optional HID Usages
- Sample Report Descriptor for a Touch Digitizer Device
- Multitouch Digitizer Drivers
- Required and Optional HID Usages
- HID Specification Support for Multitouch
- Reporting Modes
- Serial Mode
- Parallel Mode
- Hybrid Mode
- Null Values
- Sample Report Descriptor (Parallel/Hybrid Mode)
- Sample Report Descriptor (Serial Reporting Mode)
- Pen Digitizer Drivers
- Required and Optional HID Usages
- Sample Report Descriptor for a Pen Digitizer Device
- Dual-mode Digitizers
- Reporting Physical Dimensions
- Top-Level Collection Guidance
- Capability Discovery and Configuration
- Device
- Feature Report Requirements
- Device Mode
- Device Identifier
- Touch and Pen Support
- Resources
メモ
Windows Touch
シングルタッチ
- Required and Optional HID Usages
- Requied
- X (page 0x01, usage 0x30) and Y (page 0x01, usage 0x31).
- Tip switch (page 0x0D, usage 0x42).
- In-range (page 0x0D, usage 0x32).
- Optional
- Confidence (page 0x0D, usage 0x47).
- Width and height (page 0x0D, usages 0x48 and 0x49).
- Requied
0x05, 0x0d, // USAGE_PAGE (Digitizers) 0 0x09, 0x04, // USAGE (Touch Screen) 2 0xa1, 0x01, // COLLECTION (Application) 4 0x85, REPORTID_TOUCH, // REPORT_ID (Touch) 6 0x09, 0x20, // USAGE (Stylus) 8 0xa1, 0x00, // COLLECTION (Physical) 10 0x09, 0x42, // USAGE (Tip Switch) 12 0x15, 0x00, // LOGICAL_MINIMUM (0) 14 0x25, 0x01, // LOGICAL_MAXIMUM (1) 16 0x75, 0x01, // REPORT_SIZE (1) 18 0x95, 0x01, // REPORT_COUNT (1) 20 0x81, 0x02, // INPUT (Data,Var,Abs) 22 0x95, 0x03, // REPORT_COUNT (3) 24 0x81, 0x03, // INPUT (Cnst,Ary,Abs) 26 0x09, 0x32, // USAGE (In Range) 28 0x09, 0x37, // USAGE (Data Valid-Finger) 30 0x95, 0x02, // REPORT_COUNT (2) 32 0x81, 0x02, // INPUT (Data,Var,Abs) 34 0x95, 0x0a, // REPORT_COUNT (10) 36 0x81, 0x03, // INPUT (Cnst,Ary,Abs) 38 0x05, 0x01, // USAGE_PAGE (Generic Desktop) 40 0x26, 0xff, 0x7f, // LOGICAL_MAXIMUM (32767) 42 0x75, 0x10, // REPORT_SIZE (16) 45 0x95, 0x01, // REPORT_COUNT (1) 47 0xa4, // PUSH 49 0x55, 0x0d, // UNIT_EXPONENT (-3) 50 0x65, 0x00, // UNIT (None) 52 0x09, 0x30, // USAGE (X) 54 0x35, 0x00, // PHYSICAL_MINIMUM (0) 56 0x46, 0x00, 0x00, // PHYSICAL_MAXIMUM (0) 58 0x81, 0x02, // INPUT (Data,Var,Abs) 61 0x09, 0x31, // USAGE (Y) 63 0x46, 0x00, 0x00, // PHYSICAL_MAXIMUM (0) 65 0x81, 0x02, // INPUT (Data,Var,Abs) 68 0xb4, // POP 70 0x05, 0x0d, // USAGE PAGE (Digitizers) 71 0x09, 0x60, // USAGE (Width) 73 0x09, 0x61, // USAGE (Height) 75 0x95, 0x02, // REPORT_COUNT (2) 77 0x81, 0x02, // INPUT (Data,Var,Abs) 79 0x95, 0x01, // REPORT_COUNT (1) 81 0x81, 0x03, // INPUT (Cnst,Ary,Abs) 83/85 0xc0, // END_COLLECTION 0/1 0xc0, // END_COLLECTION 0/1
マルチタッチ
- Required and Optional HID Usages
- Requied
- X (page 0x01, usage 0x30) and Y (page 0x01, usage 0x31).
- Contact ID (page 0x0D, usage 0x51).
- Contact count maximum (page 0x0D, usage 0x55).
- Tip switch (page 0x0D, usage 0x42).
- In-range (page 0x0D, usage 0x32).
- Optional
- Confidence (page 0x0D, usage 0x47).
- Width and height (page 0x0D, usages 0x48 and 0x49).
- Requied
- HID Additions to Support Multitouch
Usage ID Usage Name Usage Types 説明 51 Contact identifier DV The ID of the current contact. 0E Configuration CA The Collection Application for the top-level collection that houses the configuration feature report. 52 Device mode DV A read/write value feature to get and set the current input configuration of a device. 23 Device settings CL The logical collection that contains the device configuration usages (Device identifier and Device mode). 53 Device Identifier SV/DV This is a static value (SV) when it is part of a digitizer or mouse top-level collection. 54 Contact count DV The usage that is specifically for devices that report all current contact information by using the parallel or hybrid mode 55 Contact count maximum DV A read-only feature for getting the total number of contacts that a multitouch device supports.
Reporting Modes
- Windows supports three ways of reporting multitouch data to the system:
- Serial mode: Each packet contains a single contact update.
- Parallel mode: Each packet is “wide” enough to support reporting the maximum number of contacts that the device can detect.
- Hybrid mode: Each packet contains a fixed number of contacts (less than the total number that the device can detect), and multiple packets are sent to convey all the contact data.
Parallel/Hybrid Mode
0x05, 0x0d, // USAGE_PAGE (Digitizers) 0x09, 0x04, // USAGE (Touch Screen) 0xa1, 0x01, // COLLECTION (Application) 0x85, REPORTID_MTOUCH, // REPORT_ID (Touch) 0x09, 0x22, // USAGE (Finger) 0xa1, 0x02, // COLLECTION (Logical) 0x09, 0x42, // USAGE (Tip Switch) 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x25, 0x01, // LOGICAL_MAXIMUM (1) 0x75, 0x01, // REPORT_SIZE (1) 0x95, 0x01, // REPORT_COUNT (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x09, 0x32, // USAGE (In Range) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x09, 0x47, // USAGE (Touch Valid) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x95, 0x05, // REPORT_COUNT (5) 0x81, 0x03, // INPUT (Cnst,Ary,Abs) 0x75, 0x08, // REPORT_SIZE (8) 0x09, 0x51, // USAGE (Contact Identifier) 0x95, 0x01, // REPORT_COUNT (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x05, 0x01, // USAGE_PAGE (Generic Desk.. 0x26, 0xff, 0x7f, // LOGICAL_MAXIMUM (32767) 0x75, 0x10, // REPORT_SIZE (16) 0x55, 0x00, // UNIT_EXPONENT (0) 0x65, 0x00, // UNIT (None) 0x09, 0x30, // USAGE (X) 0x35, 0x00, // PHYSICAL_MINIMUM (0) 0x46, 0x00, 0x00, // PHYSICAL_MAXIMUM (0) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x09, 0x31, // USAGE (Y) 0x46, 0x00, 0x00, // PHYSICAL_MAXIMUM (0) 0x81, 0x02, // INPUT (Data,Var,Abs) 0xc0, // END_COLLECTION 0xa1, 0x02, // COLLECTION (Logical) 0x05, 0x0d, // USAGE_PAGE (Digitizers) 0x09, 0x42, // USAGE (Tip Switch) 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x25, 0x01, // LOGICAL_MAXIMUM (1) 0x75, 0x01, // REPORT_SIZE (1) 0x95, 0x01, // REPORT_COUNT (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x09, 0x32, // USAGE (In Range) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x09, 0x47, // USAGE (Touch Valid) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x95, 0x05, // REPORT_COUNT (5) 0x81, 0x03, // INPUT (Cnst,Ary,Abs) 0x75, 0x08, // REPORT_SIZE (8) 0x09, 0x51, // USAGE ( Cotact Identifier) 0x95, 0x01, // REPORT_COUNT (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x05, 0x01, // USAGE_PAGE (Generic Desk.. 0x26, 0xff, 0x7f, // LOGICAL_MAXIMUM (32767) 0x75, 0x10, // REPORT_SIZE (16) 0x55, 0x00, // UNIT_EXPONENT (0) 0x65, 0x00, // UNIT (None) 0x09, 0x30, // USAGE (X) 0x35, 0x00, // PHYSICAL_MINIMUM (0) 0x46, 0x00, 0x00, // PHYSICAL_MAXIMUM (0) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x09, 0x31, // USAGE (Y) 0x46, 0x00, 0x00, // PHYSICAL_MAXIMUM (0) 0x81, 0x02, // INPUT (Data,Var,Abs) 0xc0, // END_COLLECTION 0x05, 0x0d, // USAGE_PAGE (Digitizers) 0x09, 0x54, // USAGE (Contact Count) 0x95, 0x01, // REPORT_COUNT (1) 0x75, 0x08, // REPORT_SIZE (8) 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x25, 0x08, // LOGICAL_MAXIMUM (8) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x09, 0x55, // USAGE(Contact Count Maximum) 0xb1, 0x02, // FEATURE (Data,Var,Abs) 0xc0, // END_COLLECTION
Serial Reporting Mode
0x05, 0x0d, // USAGE_PAGE (Digitizers) 0x09, 0x04, // USAGE (Touch Screen) 0xa1, 0x01, // COLLECTION (Application) 0x85, REPORTID_MTOUCH, // REPORT_ID (Touch) 0x09, 0x22, // USAGE (Finger) 0xa1, 0x00, // COLLECTION (Physical) 0x09, 0x42, // USAGE (Tip Switch) 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x25, 0x01, // LOGICAL_MAXIMUM (1) 0x75, 0x01, // REPORT_SIZE (1) 0x95, 0x01, // REPORT_COUNT (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x95, 0x03, // REPORT_COUNT (3) 0x81, 0x03, // INPUT (Cnst,Ary,Abs) 0x09, 0x32, // USAGE (In Range) 0x09, 0x47, // USAGE (Touch Valid) 0x95, 0x02, // REPORT_COUNT (2) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x95, 0x0a, // REPORT_COUNT (10) 0x81, 0x03, // INPUT (Cnst,Ary,Abs) 0x05, 0x01, // USAGE_PAGE (Generic Desk.. 0x26, 0xff, 0x7f, // LOGICAL_MAXIMUM (32767) 0x75, 0x10, // REPORT_SIZE (16) 0x95, 0x01, // REPORT_COUNT (1) 0x65, 0x00, // UNIT (None) 0x09, 0x30, // USAGE (X) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x09, 0x31, // USAGE (Y) 0x46, 0x00, 0x00, // PHYSICAL_MAXIMUM (0) 0x81, 0x02, // INPUT (Data,Var,Abs) 0xb4, // POP 0x05, 0x0d, // USAGE PAGE (Digitizers) 0x09, 0x48, // USAGE (Width) 0x09, 0x49, // USAGE (Height) 0x95, 0x01, // REPORT_COUNT (2) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x81, 0x03, // INPUT (Cnst,Ary,Abs) 0x09, 0x51, // USAGE (Contact Identifier) 0x75, 0x10, // REPORT_SIZE (16) 0x95, 0x02, // REPORT_COUNT (1) 0x81, 0x02, // INPUT (Data,Var,Abs) 0x09, 0x55, // USAGE(Contact Count Maximum) 0x15, 0x00, // LOGICAL_MINIMUM (0) 0x25, 0x08, // LOGICAL_MAXIMUM (8) 0x75, 0x08, // REPORT_SIZE (8) 0x95, 0x01, // REPORT_COUNT (1) 0xb1, 0x02, // FEATURE (Data,Var,Abs) 0xc0, // END_COLLECTION 0xc0, // END_COLLECTION