admin管理员组

文章数量:1406926

I am developing an utility which needs to match tapped CGEvents to the USB device that originated them (a touchscreen, specifically).

I got to the point where I can get the Service Registry ID from the CGEvent and the Device Registry ID from the USB device. To put this in other words, if i use the hidutil list command in terminal this are the two entries that i have (cut for brevity):

Services:
VendorID ProductID LocationID UsagePage Usage RegistryID  Transport Class                                Product                            UserClass                  Built-In 
0x27c6   0x529     0x2111000  1         2     0x100026c93 USB       AppleUserHIDEventService             TouchScreen                        AppleUserHIDEventDriver    0        

Devices:
VendorID ProductID LocationID UsagePage Usage RegistryID  Transport Class                                Product                            UserClass                  Built-In
0x27c6   0x529     0x2111000  65280     255   0x100026c85 USB       AppleUserHIDDevice                   TouchScreen                        AppleUserUSBHostHIDDevice  0

How can i match this 0x100026c93 to this 0x100026c85?

本文标签: swiftMatching service registry IDs to device registry IDStack Overflow