Changeset 26811 in vbox
- Timestamp:
- Feb 25, 2010 6:11:28 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 58081
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/VBox/Devices/Input/UsbMouse.cpp ¶
r26810 r26811 187 187 typedef struct USBHIDT_REPORT 188 188 { 189 uint8_t btn; 190 int8_t dz; 189 191 uint16_t cx; 190 192 uint16_t cy; 191 int8_t dz;192 uint8_t btn;193 193 } USBHIDT_REPORT, *PUSBHIDT_REPORT; 194 194 … … 275 275 276 276 /* HID report descriptor (tablet). */ 277 /* NB: The layout is far from random. Having the buttons and Z axis grouped 278 * together avoids alignment issues. Also, if X/Y is reported first, followed 279 * by buttons/Z, Windows gets phantom Z movement. That is likely a bug in Windows 280 * as OS X shows no such problem. When X/Y is reported last, Windows behaves 281 * properly. 282 */ 277 283 static const uint8_t g_UsbHidTReportDesc[] = 278 284 { … … 282 288 /* Usage */ 0x09, 0x01, /* Pointer */ 283 289 /* Collection */ 0xA1, 0x00, /* Physical */ 284 /* Usage Page */ 0x05, 0x01, /* Generic Desktop */285 /* Usage */ 0x09, 0x30, /* X */286 /* Usage */ 0x09, 0x31, /* Y */287 /* Logical Minimum */ 0x15, 0x00, /* 0 */288 /* Logical Maximum */ 0x26, 0xFF,0x7F,/* 0x7fff */289 /* Physical Minimum */ 0x35, 0x00, /* 0 */290 /* Physical Maximum */ 0x46, 0xFF,0x7F,/* 0x7fff */291 /* Report Size */ 0x75, 0x10, /* 16 */292 /* Report Count */ 0x95, 0x02, /* 2 */293 /* Input */ 0x81, 0x02, /* Data, Value, Absolute, Bit field */294 /* Usage Page */ 0x05, 0x01, /* Generic Desktop */295 /* Usage */ 0x09, 0x38, /* Z (wheel) */296 /* Logical Minimum */ 0x15, 0x81, /* -127 */297 /* Logical Maximum */ 0x25, 0x7F, /* +127 */298 /* Report Size */ 0x75, 0x08, /* 8 */299 /* Report Count */ 0x95, 0x01, /* 1 */300 /* Input */ 0x81, 0x06, /* Data, Value, Relative, Bit field */301 290 /* Usage Page */ 0x05, 0x09, /* Button */ 302 291 /* Usage Minimum */ 0x19, 0x01, /* Button 1 */ … … 310 299 /* Report Size */ 0x75, 0x05, /* 5 (padding bits) */ 311 300 /* Input */ 0x81, 0x03, /* Constant, Value, Absolute, Bit field */ 301 /* Usage Page */ 0x05, 0x01, /* Generic Desktop */ 302 /* Usage */ 0x09, 0x38, /* Z (wheel) */ 303 /* Logical Minimum */ 0x15, 0x81, /* -127 */ 304 /* Logical Maximum */ 0x25, 0x7F, /* +127 */ 305 /* Report Size */ 0x75, 0x08, /* 8 */ 306 /* Report Count */ 0x95, 0x01, /* 1 */ 307 /* Input */ 0x81, 0x06, /* Data, Value, Relative, Bit field */ 308 /* Usage Page */ 0x05, 0x01, /* Generic Desktop */ 309 /* Usage */ 0x09, 0x30, /* X */ 310 /* Usage */ 0x09, 0x31, /* Y */ 311 /* Logical Minimum */ 0x15, 0x00, /* 0 */ 312 /* Logical Maximum */ 0x26, 0xFF,0x7F,/* 0x7fff */ 313 /* Physical Minimum */ 0x35, 0x00, /* 0 */ 314 /* Physical Maximum */ 0x46, 0xFF,0x7F,/* 0x7fff */ 315 /* Report Size */ 0x75, 0x10, /* 16 */ 316 /* Report Count */ 0x95, 0x02, /* 2 */ 317 /* Input */ 0x81, 0x02, /* Data, Value, Absolute, Bit field */ 312 318 /* End Collection */ 0xC0, 313 319 /* End Collection */ 0xC0,
Note:
See TracChangeset
for help on using the changeset viewer.