|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
using this excellent library_______________________________________________
<http://developer.apple.com/samplecode/Sample_Code/
Devices_and_Hardware/HID_Manager/HID_Utilities_Source.htm>
I could list the USD device quite easily like this:
//------
HIDBuildDeviceList(NULL, NULL);
recDevice *pd;
for(pd = HIDGetFirstDevice(); pd; pd = HIDGetNextDevice(pd)) {
printf("--------------------\n");
printf("HID.manufacturer %s\n", pd->manufacturer);
printf("HID.product %s\n", pd->product);
printf("HID.serial %s\n", pd->serial);
}
HIDReleaseDeviceList();
//------
However I see no way to know if a given devices is a keyboard, a mouse,
otherwise...
of course when the product name is "Generic USB Keyboard", I could read
it, but I would like to avoid strcmp() calls and use the keys define,
for example, in a header like <IOKit/hid/IOHIDKeys.h>, whereas I see a
list of enum and #define, but none as a comprehensive name like
"kIOHDEmouseType", "kIOHDEKeyboardType", I'm lost ...
any help ?
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.
| References: | |
| >mouse, keyboard ... (From: Lloyd Dupont <email@hidden>) |
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.