Hi
I’m developing HID minidriver for absolute positioning device.
I have composite HID descriptor; it contains absolute mouse and digitizer (pen) top level collections.
Here are relevant parts of HID descriptor:
Absolute mouse:
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x30, // USAGE (X)
0x65, 0x11, // Unit SI line dist.
0x55, 0x0E, // Unit exp -2
0x35, 0x01, // PHYSICAL_MINIMUM (0)
0x47, 0xfe, 0xff, 0x00, 0x00, // PHYSICAL_MAXIMUM (FFFF)
0x15, 0x00, // LOGICAL_MINIMUM (0) cm ^-2
0x26, 0x08, 0x07, // LOGICAL_MAXIMUM (1800)
0x75, 0x20, // REPORT_SIZE (32) // 0x75 , 0x18 Size (24)
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x02,// 0x0A, // INPUT (Data,Var,Abs,NoWrap) // for mouse no wrap for X, Y ???
0x09, 0x31, // USAGE (Y)
0x65, 0x11, // Unit SI line dist.
0x55, 0x0E, // Unit exp -2
0x35, 0x01, // PHYSICAL_MINIMUM (0)
0x47, 0xfe, 0xff, 0x00, 0x00, // PHYSICAL_MAXIMUM (FFFF-1)
0x16, 0xf4, 0x01, // LOGICAL_MINIMUM (500) cm ^-2
0x26, 0x3a, 0x07, // LOGICAL_MAXIMUM (1850)
0x75, 0x20, // REPORT_SIZE (32) // 0x75 , 0x18 Size (24)
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x02 ,//0x0A, // INPUT (Data,Var,Abs,NoWrap) // for mouse no wrap
Digitizer section :
0x05, 0x01, // USAGE_PAGE (Generic Desktop) 30
0x09, 0x30, // USAGE (X)
0x75, 0x20, // REPORT_SIZE (32)
0x95, 0x01, // REPORT_COUNT (1)
0xa4, // PUSH 38
0x65, 0x11, // Unit SI line dist.
0x55, 0x0E, // Unit exp -2
0x35, 0x00, // PHYSICAL_MINIMUM (0)
0x47, 0xff, 0xff, 0x00, 0x00, // PHYSICAL_MAXIMUM (FFFF)
0x15, 0x00, // LOGICAL_MINIMUM (0) cm ^-2
0x26, 0x08, 0x07, // LOGICAL_MAXIMUM (1800)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x09, 0x31, // USAGE (Y)
0x65, 0x11, // Unit SI line dist.
0x55, 0x0E, // Unit exp -2
0x35, 0x00, // PHYSICAL_MINIMUM (0)
0x47, 0xff, 0xff, 0x00, 0x00, // PHYSICAL_MAXIMUM (FFFF)
0x16, 0xf4, 0x01, // LOGICAL_MINIMUM (500) cm ^-2
0x26, 0x3a, 0x07, // LOGICAL_MAXIMUM (1850)
0x75, 0x20, // REPORT_SIZE (32)
0x95, 0x01, // REPORT_COUNT (1)
0x81, /*0x02*/ 0x0A, // INPUT (Data,Var,Abs,Wrap)
Both these reports receive exactly the same coordinates from the device.
However there is a difference how OS handle input. In case I return digitizer (pen) report and X or Y coordinate has reached its maximum the cursor sticks to the correct side of the screen.
On contrary , in case of mouse report while values of X or Y reach maximum mouse cursor wraps around to the other edge : for example in case of Y cursors reaches the bottom and then wraps to the top of the screen and stays stick to the top side. It does not continue to move downwards! I tried to change INPUT (Data,Var,Abs,NoWrap) item for mouse to NoWrap , preferred state etc but it does not help. BTW this behavior is consistent to all OS (win 2k ->Vista) so it seems to be a bug in my descriptor.
I checked USB.org HID usage table document but still cannot understand what the problem is.
Can anybody help me with this?
Any help will be greatly appreciated.
David