HID.h
上传用户:xjjlds
上传日期:2015-12-05
资源大小:22823k
文件大小:100k
源码类别:

多媒体编程

开发平台:

Visual C++

  1. /*
  2.      File:       HID.h
  3.  
  4.      Contains:   Definition of the interfaces to the HIDLib shared library and
  5.  
  6.      Version:    Technology: HID 1.0
  7.                  Release:    QuickTime 6.0.2
  8.  
  9.      Copyright:  (c) 1999-2001 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:      For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __HID__
  18. #define __HID__
  19. #ifndef __MACTYPES__
  20. #include "MacTypes.h"
  21. #endif
  22. #ifndef __MACERRORS__
  23. #include "MacErrors.h"
  24. #endif
  25. #if PRAGMA_ONCE
  26. #pragma once
  27. #endif
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31. #if PRAGMA_IMPORT
  32. #pragma import on
  33. #endif
  34. #if PRAGMA_STRUCT_ALIGN
  35.     #pragma options align=mac68k
  36. #elif PRAGMA_STRUCT_PACKPUSH
  37.     #pragma pack(push, 2)
  38. #elif PRAGMA_STRUCT_PACK
  39.     #pragma pack(2)
  40. #endif
  41. /*
  42.    
  43.     Interfaces for HIDLib
  44. */
  45. /* types of HID reports (input, output, feature)*/
  46. enum {
  47.     kHIDInputReport             = 1,
  48.     kHIDOutputReport            = 2,
  49.     kHIDFeatureReport           = 3,
  50.     kHIDUnknownReport           = 255
  51. };
  52. /* flags passed to HIDOpenReportDescriptor*/
  53. enum {
  54.     kHIDFlag_StrictErrorChecking = 0x00000001
  55. };
  56. typedef UInt32                          HIDReportType;
  57. typedef UInt32                          HIDUsage;
  58. typedef struct OpaqueHIDPreparsedDataRef*  HIDPreparsedDataRef;
  59. struct HIDUsageAndPage {
  60.     HIDUsage                        usage;
  61.     HIDUsage                        usagePage;
  62. };
  63. typedef struct HIDUsageAndPage          HIDUsageAndPage;
  64. typedef HIDUsageAndPage *               HIDUsageAndPagePtr;
  65. struct HIDCaps {
  66.     HIDUsage                        usage;
  67.     HIDUsage                        usagePage;
  68.     ByteCount                       inputReportByteLength;
  69.     ByteCount                       outputReportByteLength;
  70.     ByteCount                       featureReportByteLength;
  71.     UInt32                          numberCollectionNodes;
  72.     UInt32                          numberInputButtonCaps;
  73.     UInt32                          numberInputValueCaps;
  74.     UInt32                          numberOutputButtonCaps;
  75.     UInt32                          numberOutputValueCaps;
  76.     UInt32                          numberFeatureButtonCaps;
  77.     UInt32                          numberFeatureValueCaps;
  78. };
  79. typedef struct HIDCaps                  HIDCaps;
  80. typedef HIDCaps *                       HIDCapsPtr;
  81. struct HIDCollectionNode {
  82.     HIDUsage                        collectionUsage;
  83.     HIDUsage                        collectionUsagePage;
  84.     UInt32                          parent;
  85.     UInt32                          numberOfChildren;
  86.     UInt32                          nextSibling;
  87.     UInt32                          firstChild;
  88. };
  89. typedef struct HIDCollectionNode        HIDCollectionNode;
  90. typedef HIDCollectionNode *             HIDCollectionNodePtr;
  91. struct HIDButtonCaps {
  92.     HIDUsage                        usagePage;
  93.     UInt32                          reportID;
  94.     UInt32                          bitField;
  95.     UInt32                          collection;
  96.     HIDUsage                        collectionUsage;
  97.     HIDUsage                        collectionUsagePage;
  98.     Boolean                         isRange;
  99.     Boolean                         isStringRange;
  100.     Boolean                         isDesignatorRange;
  101.     Boolean                         isAbsolute;
  102.     union {
  103.         struct {
  104.             HIDUsage                        usageMin;
  105.             HIDUsage                        usageMax;
  106.             UInt32                          stringMin;
  107.             UInt32                          stringMax;
  108.             UInt32                          designatorMin;
  109.             UInt32                          designatorMax;
  110.         }                                 range;
  111.         struct {
  112.             HIDUsage                        usage;
  113.             HIDUsage                        reserved1;
  114.             UInt32                          stringIndex;
  115.             UInt32                          reserved2;
  116.             UInt32                          designatorIndex;
  117.             UInt32                          reserved3;
  118.         }                                 notRange;
  119.     }                                 u;
  120. };
  121. typedef struct HIDButtonCaps            HIDButtonCaps;
  122. typedef HIDButtonCaps *                 HIDButtonCapsPtr;
  123. struct HIDValueCaps {
  124.     HIDUsage                        usagePage;
  125.     UInt32                          reportID;
  126.     UInt32                          bitField;
  127.     UInt32                          collection;
  128.     HIDUsage                        collectionUsage;
  129.     HIDUsage                        collectionUsagePage;
  130.     Boolean                         isRange;
  131.     Boolean                         isStringRange;
  132.     Boolean                         isDesignatorRange;
  133.     Boolean                         isAbsolute;
  134.     UInt32                          bitSize;
  135.     UInt32                          reportCount;
  136.     SInt32                          logicalMin;
  137.     SInt32                          logicalMax;
  138.     SInt32                          physicalMin;
  139.     SInt32                          physicalMax;
  140.     union {
  141.         struct {
  142.             HIDUsage                        usageMin;
  143.             HIDUsage                        usageMax;
  144.             UInt32                          stringMin;
  145.             UInt32                          stringMax;
  146.             UInt32                          designatorMin;
  147.             UInt32                          designatorMax;
  148.         }                                 range;
  149.         struct {
  150.             HIDUsage                        usage;
  151.             HIDUsage                        reserved1;
  152.             UInt32                          stringIndex;
  153.             UInt32                          reserved2;
  154.             UInt32                          designatorIndex;
  155.             UInt32                          reserved3;
  156.         }                                 notRange;
  157.     }                                 u;
  158. };
  159. typedef struct HIDValueCaps             HIDValueCaps;
  160. typedef HIDValueCaps *                  HIDValueCapsPtr;
  161. #if CALL_NOT_IN_CARBON
  162. EXTERN_API_C( OSStatus )
  163. HIDOpenReportDescriptor         (void *                 hidReportDescriptor,
  164.                                  ByteCount              descriptorLength,
  165.                                  HIDPreparsedDataRef *  preparsedDataRef,
  166.                                  UInt32                 flags);
  167. EXTERN_API_C( OSStatus )
  168. HIDCloseReportDescriptor        (HIDPreparsedDataRef    preparsedDataRef);
  169. EXTERN_API_C( OSStatus )
  170. HIDGetCaps                      (HIDPreparsedDataRef    preparsedDataRef,
  171.                                  HIDCapsPtr             capabilities);
  172. EXTERN_API_C( OSStatus )
  173. HIDGetCollectionNodes           (HIDCollectionNodePtr   collectionNodes,
  174.                                  UInt32 *               collectionNodesSize,
  175.                                  HIDPreparsedDataRef    preparsedDataRef);
  176. EXTERN_API_C( OSStatus )
  177. HIDGetButtonCaps                (HIDReportType          reportType,
  178.                                  HIDButtonCapsPtr       buttonCaps,
  179.                                  UInt32 *               buttonCapsSize,
  180.                                  HIDPreparsedDataRef    preparsedDataRef);
  181. EXTERN_API_C( OSStatus )
  182. HIDGetValueCaps                 (HIDReportType          reportType,
  183.                                  HIDValueCapsPtr        valueCaps,
  184.                                  UInt32 *               valueCapsSize,
  185.                                  HIDPreparsedDataRef    preparsedDataRef);
  186. EXTERN_API_C( OSStatus )
  187. HIDGetSpecificButtonCaps        (HIDReportType          reportType,
  188.                                  HIDUsage               usagePage,
  189.                                  UInt32                 collection,
  190.                                  HIDUsage               usage,
  191.                                  HIDButtonCapsPtr       buttonCaps,
  192.                                  UInt32 *               buttonCapsSize,
  193.                                  HIDPreparsedDataRef    preparsedDataRef);
  194. EXTERN_API_C( OSStatus )
  195. HIDGetSpecificValueCaps         (HIDReportType          reportType,
  196.                                  HIDUsage               usagePage,
  197.                                  UInt32                 collection,
  198.                                  HIDUsage               usage,
  199.                                  HIDValueCapsPtr        valueCaps,
  200.                                  UInt32 *               valueCapsSize,
  201.                                  HIDPreparsedDataRef    preparsedDataRef);
  202. EXTERN_API_C( UInt32 )
  203. HIDMaxUsageListLength           (HIDReportType          reportType,
  204.                                  HIDUsage               usagePage,
  205.                                  HIDPreparsedDataRef    preparsedDataRef);
  206. EXTERN_API_C( OSStatus )
  207. HIDGetReportLength              (HIDReportType          reportType,
  208.                                  UInt8                  reportID,
  209.                                  ByteCount *            reportLength,
  210.                                  HIDPreparsedDataRef    preparsedDataRef);
  211. EXTERN_API_C( OSStatus )
  212. HIDInitReport                   (HIDReportType          reportType,
  213.                                  UInt8                  reportID,
  214.                                  HIDPreparsedDataRef    preparsedDataRef,
  215.                                  void *                 report,
  216.                                  ByteCount              reportLength);
  217. EXTERN_API_C( OSStatus )
  218. HIDGetButtons                   (HIDReportType          reportType,
  219.                                  UInt32                 collection,
  220.                                  HIDUsageAndPagePtr     usageList,
  221.                                  UInt32 *               usageListSize,
  222.                                  HIDPreparsedDataRef    preparsedDataRef,
  223.                                  void *                 report,
  224.                                  ByteCount              reportLength);
  225. EXTERN_API_C( OSStatus )
  226. HIDGetButtonsOnPage             (HIDReportType          reportType,
  227.                                  HIDUsage               usagePage,
  228.                                  UInt32                 collection,
  229.                                  HIDUsage *             usageList,
  230.                                  UInt32 *               usageListSize,
  231.                                  HIDPreparsedDataRef    preparsedDataRef,
  232.                                  void *                 report,
  233.                                  ByteCount              reportLength);
  234. EXTERN_API_C( OSStatus )
  235. HIDGetScaledUsageValue          (HIDReportType          reportType,
  236.                                  HIDUsage               usagePage,
  237.                                  UInt32                 collection,
  238.                                  HIDUsage               usage,
  239.                                  SInt32 *               usageValue,
  240.                                  HIDPreparsedDataRef    preparsedDataRef,
  241.                                  void *                 report,
  242.                                  ByteCount              reportLength);
  243. EXTERN_API_C( OSStatus )
  244. HIDGetUsageValue                (HIDReportType          reportType,
  245.                                  HIDUsage               usagePage,
  246.                                  UInt32                 collection,
  247.                                  HIDUsage               usage,
  248.                                  SInt32 *               usageValue,
  249.                                  HIDPreparsedDataRef    preparsedDataRef,
  250.                                  void *                 report,
  251.                                  ByteCount              reportLength);
  252. EXTERN_API_C( OSStatus )
  253. HIDGetUsageValueArray           (HIDReportType          reportType,
  254.                                  HIDUsage               usagePage,
  255.                                  UInt32                 collection,
  256.                                  HIDUsage               usage,
  257.                                  Byte *                 usageValueBuffer,
  258.                                  ByteCount              usageValueBufferSize,
  259.                                  HIDPreparsedDataRef    preparsedDataRef,
  260.                                  void *                 report,
  261.                                  ByteCount              reportLength);
  262. EXTERN_API_C( OSStatus )
  263. HIDSetButton                    (HIDReportType          reportType,
  264.                                  HIDUsage               usagePage,
  265.                                  UInt32                 collection,
  266.                                  HIDUsage               usage,
  267.                                  HIDPreparsedDataRef    preparsedDataRef,
  268.                                  void *                 report,
  269.                                  ByteCount              reportLength);
  270. EXTERN_API_C( OSStatus )
  271. HIDSetButtons                   (HIDReportType          reportType,
  272.                                  HIDUsage               usagePage,
  273.                                  UInt32                 collection,
  274.                                  HIDUsage *             usageList,
  275.                                  UInt32 *               usageListSize,
  276.                                  HIDPreparsedDataRef    preparsedDataRef,
  277.                                  void *                 report,
  278.                                  ByteCount              reportLength);
  279. EXTERN_API_C( OSStatus )
  280. HIDSetScaledUsageValue          (HIDReportType          reportType,
  281.                                  HIDUsage               usagePage,
  282.                                  UInt32                 collection,
  283.                                  HIDUsage               usage,
  284.                                  SInt32                 usageValue,
  285.                                  HIDPreparsedDataRef    preparsedDataRef,
  286.                                  void *                 report,
  287.                                  ByteCount              reportLength);
  288. EXTERN_API_C( OSStatus )
  289. HIDSetUsageValue                (HIDReportType          reportType,
  290.                                  HIDUsage               usagePage,
  291.                                  UInt32                 collection,
  292.                                  HIDUsage               usage,
  293.                                  SInt32                 usageValue,
  294.                                  HIDPreparsedDataRef    preparsedDataRef,
  295.                                  void *                 report,
  296.                                  ByteCount              reportLength);
  297. EXTERN_API_C( OSStatus )
  298. HIDSetUsageValueArray           (HIDReportType          reportType,
  299.                                  HIDUsage               usagePage,
  300.                                  UInt32                 collection,
  301.                                  HIDUsage               usage,
  302.                                  Byte *                 usageValueBuffer,
  303.                                  ByteCount              usageValueBufferLength,
  304.                                  HIDPreparsedDataRef    preparsedDataRef,
  305.                                  void *                 report,
  306.                                  ByteCount              reportLength);
  307. EXTERN_API_C( OSStatus )
  308. HIDUsageListDifference          (HIDUsage *             previousUsageList,
  309.                                  HIDUsage *             currentUsageList,
  310.                                  HIDUsage *             breakUsageList,
  311.                                  HIDUsage *             makeUsageList,
  312.                                  UInt32                 usageListsSize);
  313. /*
  314.    
  315.     Interfaces for a HID device driver
  316. */
  317. /* these are the constants to be passed to HIDGetDeviceInfo*/
  318. #endif  /* CALL_NOT_IN_CARBON */
  319. enum {
  320.     kHIDGetInfo_VendorID        = 1,
  321.     kHIDGetInfo_ProductID       = 2,
  322.     kHIDGetInfo_VersionNumber   = 3,
  323.     kHIDGetInfo_MaxReportSize   = 0x10,
  324.     kHIDGetInfo_GetManufacturerString = 0x0100,
  325.     kHIDGetInfo_GetProductString = 0x0101,
  326.     kHIDGetInfo_GetSerialNumberString = 0x0102,
  327.     kHIDGetInfo_GetIndexedString = 0x0103,
  328.     kHIDGetInfo_VendorSpecificStart = 0x00010000
  329. };
  330. /* these are the valid permissions to pass to HIDOpenDevice*/
  331. enum {
  332.     kHIDPerm_ReadOnly           = 0x0001,
  333.     kHIDPerm_ReadWriteShared    = 0x0003,
  334.     kHIDPerm_ReadWriteExclusive = 0x0013
  335. };
  336. /* these are flags used in HIDInstallReportHandler*/
  337. enum {
  338.     kHIDFlag_CallbackIsResident = 0x0001
  339. };
  340. /* these are the constants to be passed to HIDControlDevice*/
  341. enum {
  342.     kHIDVendorSpecificControlStart = 0x00010000
  343. };
  344. /* these constant versions are used in the HIDDeviceDispatchTable structure*/
  345. enum {
  346.     kHIDCurrentDispatchTableVersion = 2,
  347.     kHIDOldestCompatableDispatchTableVersion = 1,
  348.     kHIDDispatchTableVersion1   = 1,
  349.     kHIDDispatchTableVersion1OldestCompatible = 1
  350. };
  351. typedef struct OpaqueHIDDeviceConnectionRef*  HIDDeviceConnectionRef;
  352. /* HIDGetDeviceInfo is used to get specific information about a HID Device*/
  353. typedef CALLBACK_API_C( OSStatus , HIDGetDeviceInfoProcPtr )(UInt32 inInfoSelector, void *outInfo, ByteCount *ioSize);
  354. /* HIDGetHIDDescriptor is used to get a specific HID descriptor from a HID device (such as a report descriptor)*/
  355. typedef CALLBACK_API_C( OSStatus , HIDGetHIDDescriptorProcPtr )(UInt32 inDescriptorType, UInt32 inDescriptorIndex, void *outDescriptor, UInt32 *ioBufferSize);
  356. /* You must first 'open' a device before using it*/
  357. typedef CALLBACK_API_C( OSStatus , HIDOpenDeviceProcPtr )(HIDDeviceConnectionRef *outConnectionRef, UInt32 permissions, UInt32 reserved);
  358. /* When finished, 'close' a device*/
  359. typedef CALLBACK_API_C( OSStatus , HIDCloseDeviceProcPtr )(HIDDeviceConnectionRef inConnectionRef);
  360. /* User provided ProcPtr to be called when HID report is received*/
  361. typedef CALLBACK_API_C( void , HIDReportHandlerProcPtr )(void *inHIDReport, UInt32 inHIDReportLength, UInt32 inRefcon);
  362. /*
  363.    When installed, a report handler is called at defered task time (unless kHIDFlag_CallbackIsResident is passed) 
  364.    whenever an interrupt packet is recieved on the first interrupt in pipe. The supplied refcon is also passed thru.
  365. */
  366. typedef CALLBACK_API_C( OSStatus , HIDInstallReportHandlerProcPtr )(HIDDeviceConnectionRef inConnectionRef, UInt32 flags, HIDReportHandlerProcPtr inReportHandlerProc, UInt32 inRefcon);
  367. /* When finished, remove the report handler.*/
  368. typedef CALLBACK_API_C( OSStatus , HIDRemoveReportHandlerProcPtr )(HIDDeviceConnectionRef inConnectionRef);
  369. /* If there was a HIDReportHandler installed previous to the one from this connection, pass that one this report*/
  370. typedef CALLBACK_API_C( OSStatus , HIDCallPreviousReportHandlerProcPtr )(HIDDeviceConnectionRef inConnectionRef, void *inHIDReport, UInt32 inHIDReportLength);
  371. /*
  372.    HIDGetReport is used to get a report (of type input, output, or feature) directly from a HID device
  373.    the HIDReportHandler will be called with the report when it is received.
  374. */
  375. typedef CALLBACK_API_C( OSStatus , HIDGetReportProcPtr )(HIDDeviceConnectionRef inConnectionRef, UInt32 inReportType, UInt32 inReportID, HIDReportHandlerProcPtr inReportHandlerProc, UInt32 inRefcon);
  376. /* HIDSetReport is used to send a report (of type input, output, or feature) directly to a HID device*/
  377. typedef CALLBACK_API_C( OSStatus , HIDSetReportProcPtr )(HIDDeviceConnectionRef inConnectionRef, UInt32 inReportType, UInt32 inReportID, void *inInfo, ByteCount inSize);
  378. /* HIDControlDevice is used to send misc control messages to a device*/
  379. typedef CALLBACK_API_C( OSStatus , HIDControlDeviceProcPtr )(HIDDeviceConnectionRef inConnectionRef, UInt32 inControlSelector, void *ioControlData);
  380. /*
  381.    dispatchTableCurrentVersion is kHIDCurrentDispatchTableVersion
  382.    dispatchTableOldestVersion is kHIDOldestCompatableDispatchTableVersion
  383.         (the oldest built client using this API that this HID device driver will work with)
  384.    vendorID is who wrote this HID device driver (hi word of 0 and USB vendorID is valid)
  385. */
  386. struct HIDDeviceDispatchTable {
  387.     UInt32                          dispatchTableCurrentVersion;
  388.     UInt32                          dispatchTableOldestVersion;
  389.     UInt32                          vendorID;
  390.     UInt32                          vendorSpecific;
  391.     UInt32                          reserved;
  392.     HIDGetDeviceInfoProcPtr         pHIDGetDeviceInfo;
  393.     HIDGetHIDDescriptorProcPtr      pHIDGetHIDDescriptor;
  394.     HIDOpenDeviceProcPtr            pHIDOpenDevice;
  395.     HIDCloseDeviceProcPtr           pHIDCloseDevice;
  396.     HIDInstallReportHandlerProcPtr  pHIDInstallReportHandler;
  397.     HIDRemoveReportHandlerProcPtr   pHIDRemoveReportHandler;
  398.     HIDCallPreviousReportHandlerProcPtr  pHIDCallPreviousReportHandler;
  399.     HIDGetReportProcPtr             pHIDGetReport;              /* new for vers 2, was reserved in version 1*/
  400.     HIDSetReportProcPtr             pHIDSetReport;              /* new for vers 2, was reserved in version 1*/
  401.     HIDControlDeviceProcPtr         pHIDControlDevice;
  402. };
  403. typedef struct HIDDeviceDispatchTable   HIDDeviceDispatchTable;
  404. typedef HIDDeviceDispatchTable *        HIDDeviceDispatchTablePtr;
  405. /* A USB HIDDevice driver should export a HIDDeviceDispatchTable symbol */
  406. /* in it's PEF container, with the name "pTheHIDDeviceDispatchTable" */
  407. /* ****************************************************************************************** */
  408. /* HID Usage Tables                                                                           */
  409. /*                                                                                            */
  410. /* The following constants are from the USB 'HID Usage Tables' specification, revision 1.1rc3 */
  411. /* ****************************************************************************************** */
  412. /* Usage Pages */
  413. enum {
  414.     kHIDPage_Undefined          = 0x00,
  415.     kHIDPage_GenericDesktop     = 0x01,
  416.     kHIDPage_Simulation         = 0x02,
  417.     kHIDPage_VR                 = 0x03,
  418.     kHIDPage_Sport              = 0x04,
  419.     kHIDPage_Game               = 0x05,                         /* Reserved 0x06 */
  420.     kHIDPage_KeyboardOrKeypad   = 0x07,                         /* USB Device Class Definition for Human Interface Devices (HID). Note: the usage type for all key codes is Selector (Sel). */
  421.     kHIDPage_LEDs               = 0x08,
  422.     kHIDPage_Button             = 0x09,
  423.     kHIDPage_Ordinal            = 0x0A,
  424.     kHIDPage_Telephony          = 0x0B,
  425.     kHIDPage_Consumer           = 0x0C,
  426.     kHIDPage_Digitizer          = 0x0D,                         /* Reserved 0x0E */
  427.     kHIDPage_PID                = 0x0F,                         /* USB Physical Interface Device definitions for force feedback and related devices. */
  428.     kHIDPage_Unicode            = 0x10,                         /* Reserved 0x11 - 0x13 */
  429.     kHIDPage_AlphanumericDisplay = 0x14,                        /* Reserved 0x15 - 0x7F */
  430.                                                                 /* Monitor 0x80 - 0x83     USB Device Class Definition for Monitor Devices */
  431.                                                                 /* Power 0x84 - 0x87   USB Device Class Definition for Power Devices */
  432.                                                                 /* Reserved 0x88 - 0x8B */
  433.     kHIDPage_BarCodeScanner     = 0x8C,                         /* (Point of Sale) USB Device Class Definition for Bar Code Scanner Devices */
  434.     kHIDPage_Scale              = 0x8D,                         /* (Point of Sale) USB Device Class Definition for Scale Devices */
  435.                                                                 /* ReservedPointofSalepages 0x8E - 0x8F */
  436.     kHIDPage_CameraControl      = 0x90,                         /* USB Device Class Definition for Image Class Devices */
  437.     kHIDPage_Arcade             = 0x91,                         /* OAAF Definitions for arcade and coinop related Devices */
  438.                                                                 /* Reserved 0x92 - 0xFEFF */
  439.                                                                 /* VendorDefined 0xFF00 - 0xFFFF */
  440.     kHIDPage_VendorDefinedStart = 0xFF00
  441. };
  442. /* Undefined Usage for all usage pages */
  443. enum {
  444.     kHIDUsage_Undefined         = 0x00
  445. };
  446. /* GenericDesktop Page (0x01) */
  447. enum {
  448.     kHIDUsage_GD_Pointer        = 0x01,                         /* Physical Collection */
  449.     kHIDUsage_GD_Mouse          = 0x02,                         /* Application Collection */
  450.                                                                 /* 0x03 Reserved */
  451.     kHIDUsage_GD_Joystick       = 0x04,                         /* Application Collection */
  452.     kHIDUsage_GD_GamePad        = 0x05,                         /* Application Collection */
  453.     kHIDUsage_GD_Keyboard       = 0x06,                         /* Application Collection */
  454.     kHIDUsage_GD_Keypad         = 0x07,                         /* Application Collection */
  455.     kHIDUsage_GD_MultiAxisController = 0x08,                    /* Application Collection */
  456.                                                                 /* 0x09 - 0x2F Reserved */
  457.     kHIDUsage_GD_X              = 0x30,                         /* Dynamic Value */
  458.     kHIDUsage_GD_Y              = 0x31,                         /* Dynamic Value */
  459.     kHIDUsage_GD_Z              = 0x32,                         /* Dynamic Value */
  460.     kHIDUsage_GD_Rx             = 0x33,                         /* Dynamic Value */
  461.     kHIDUsage_GD_Ry             = 0x34,                         /* Dynamic Value */
  462.     kHIDUsage_GD_Rz             = 0x35,                         /* Dynamic Value */
  463.     kHIDUsage_GD_Slider         = 0x36,                         /* Dynamic Value */
  464.     kHIDUsage_GD_Dial           = 0x37,                         /* Dynamic Value */
  465.     kHIDUsage_GD_Wheel          = 0x38,                         /* Dynamic Value */
  466.     kHIDUsage_GD_Hatswitch      = 0x39,                         /* Dynamic Value */
  467.     kHIDUsage_GD_CountedBuffer  = 0x3A,                         /* Logical Collection */
  468.     kHIDUsage_GD_ByteCount      = 0x3B,                         /* Dynamic Value */
  469.     kHIDUsage_GD_MotionWakeup   = 0x3C,                         /* One-Shot Control */
  470.     kHIDUsage_GD_Start          = 0x3D,                         /* On/Off Control */
  471.     kHIDUsage_GD_Select         = 0x3E,                         /* On/Off Control */
  472.                                                                 /* 0x3F Reserved */
  473.     kHIDUsage_GD_Vx             = 0x40,                         /* Dynamic Value */
  474.     kHIDUsage_GD_Vy             = 0x41,                         /* Dynamic Value */
  475.     kHIDUsage_GD_Vz             = 0x42,                         /* Dynamic Value */
  476.     kHIDUsage_GD_Vbrx           = 0x43,                         /* Dynamic Value */
  477.     kHIDUsage_GD_Vbry           = 0x44,                         /* Dynamic Value */
  478.     kHIDUsage_GD_Vbrz           = 0x45,                         /* Dynamic Value */
  479.     kHIDUsage_GD_Vno            = 0x46,                         /* Dynamic Value */
  480.                                                                 /* 0x47 - 0x7F Reserved */
  481.     kHIDUsage_GD_SystemControl  = 0x80,                         /* Application Collection */
  482.     kHIDUsage_GD_SystemPowerDown = 0x81,                        /* One-Shot Control */
  483.     kHIDUsage_GD_SystemSleep    = 0x82,                         /* One-Shot Control */
  484.     kHIDUsage_GD_SystemWakeUp   = 0x83,                         /* One-Shot Control */
  485.     kHIDUsage_GD_SystemContextMenu = 0x84,                      /* One-Shot Control */
  486.     kHIDUsage_GD_SystemMainMenu = 0x85,                         /* One-Shot Control */
  487.     kHIDUsage_GD_SystemAppMenu  = 0x86,                         /* One-Shot Control */
  488.     kHIDUsage_GD_SystemMenuHelp = 0x87,                         /* One-Shot Control */
  489.     kHIDUsage_GD_SystemMenuExit = 0x88,                         /* One-Shot Control */
  490.     kHIDUsage_GD_SystemMenu     = 0x89,                         /* Selector */
  491.     kHIDUsage_GD_SystemMenuRight = 0x8A,                        /* Re-Trigger Control */
  492.     kHIDUsage_GD_SystemMenuLeft = 0x8B,                         /* Re-Trigger Control */
  493.     kHIDUsage_GD_SystemMenuUp   = 0x8C,                         /* Re-Trigger Control */
  494.     kHIDUsage_GD_SystemMenuDown = 0x8D,                         /* Re-Trigger Control */
  495.                                                                 /* 0x8E - 0x8F Reserved */
  496.     kHIDUsage_GD_DPadUp         = 0x90,                         /* On/Off Control */
  497.     kHIDUsage_GD_DPadDown       = 0x91,                         /* On/Off Control */
  498.     kHIDUsage_GD_DPadRight      = 0x92,                         /* On/Off Control */
  499.     kHIDUsage_GD_DPadLeft       = 0x93,                         /* On/Off Control */
  500.                                                                 /* 0x94 - 0xFFFF Reserved */
  501.     kHIDUsage_GD_Reserved       = 0xFFFF
  502. };
  503. /* Simulation Page (0x02) */
  504. /* This section provides detailed descriptions of the usages employed by simulation devices. */
  505. enum {
  506.     kHIDUsage_Sim_FlightSimulationDevice = 0x01,                /* Application Collection */
  507.     kHIDUsage_Sim_AutomobileSimulationDevice = 0x02,            /* Application Collection */
  508.     kHIDUsage_Sim_TankSimulationDevice = 0x03,                  /* Application Collection */
  509.     kHIDUsage_Sim_SpaceshipSimulationDevice = 0x04,             /* Application Collection */
  510.     kHIDUsage_Sim_SubmarineSimulationDevice = 0x05,             /* Application Collection */
  511.     kHIDUsage_Sim_SailingSimulationDevice = 0x06,               /* Application Collection */
  512.     kHIDUsage_Sim_MotorcycleSimulationDevice = 0x07,            /* Application Collection */
  513.     kHIDUsage_Sim_SportsSimulationDevice = 0x08,                /* Application Collection */
  514.     kHIDUsage_Sim_AirplaneSimulationDevice = 0x09,              /* Application Collection */
  515.     kHIDUsage_Sim_HelicopterSimulationDevice = 0x0A,            /* Application Collection */
  516.     kHIDUsage_Sim_MagicCarpetSimulationDevice = 0x0B,           /* Application Collection */
  517.     kHIDUsage_Sim_BicycleSimulationDevice = 0x0C,               /* Application Collection */
  518.                                                                 /* 0x0D - 0x1F Reserved */
  519.     kHIDUsage_Sim_FlightControlStick = 0x20,                    /* Application Collection */
  520.     kHIDUsage_Sim_FlightStick   = 0x21,                         /* Application Collection */
  521.     kHIDUsage_Sim_CyclicControl = 0x22,                         /* Physical Collection */
  522.     kHIDUsage_Sim_CyclicTrim    = 0x23,                         /* Physical Collection */
  523.     kHIDUsage_Sim_FlightYoke    = 0x24,                         /* Application Collection */
  524.     kHIDUsage_Sim_TrackControl  = 0x25,                         /* Physical Collection */
  525.                                                                 /* 0x26 - 0xAF Reserved */
  526.     kHIDUsage_Sim_Aileron       = 0xB0,                         /* Dynamic Value */
  527.     kHIDUsage_Sim_AileronTrim   = 0xB1,                         /* Dynamic Value */
  528.     kHIDUsage_Sim_AntiTorqueControl = 0xB2,                     /* Dynamic Value */
  529.     kHIDUsage_Sim_AutopilotEnable = 0xB3,                       /* On/Off Control */
  530.     kHIDUsage_Sim_ChaffRelease  = 0xB4,                         /* One-Shot Control */
  531.     kHIDUsage_Sim_CollectiveControl = 0xB5,                     /* Dynamic Value */
  532.     kHIDUsage_Sim_DiveBrake     = 0xB6,                         /* Dynamic Value */
  533.     kHIDUsage_Sim_ElectronicCountermeasures = 0xB7,             /* On/Off Control */
  534.     kHIDUsage_Sim_Elevator      = 0xB8,                         /* Dynamic Value */
  535.     kHIDUsage_Sim_ElevatorTrim  = 0xB9,                         /* Dynamic Value */
  536.     kHIDUsage_Sim_Rudder        = 0xBA,                         /* Dynamic Value */
  537.     kHIDUsage_Sim_Throttle      = 0xBB,                         /* Dynamic Value */
  538.     kHIDUsage_Sim_FlightCommunications = 0xBC,                  /* On/Off Control */
  539.     kHIDUsage_Sim_FlareRelease  = 0xBD,                         /* One-Shot Control */
  540.     kHIDUsage_Sim_LandingGear   = 0xBE,                         /* On/Off Control */
  541.     kHIDUsage_Sim_ToeBrake      = 0xBF,                         /* Dynamic Value */
  542.     kHIDUsage_Sim_Trigger       = 0xC0,                         /* Momentary Control */
  543.     kHIDUsage_Sim_WeaponsArm    = 0xC1,                         /* On/Off Control */
  544.     kHIDUsage_Sim_Weapons       = 0xC2,                         /* Selector */
  545.     kHIDUsage_Sim_WingFlaps     = 0xC3,                         /* Dynamic Value */
  546.     kHIDUsage_Sim_Accelerator   = 0xC4,                         /* Dynamic Value */
  547.     kHIDUsage_Sim_Brake         = 0xC5,                         /* Dynamic Value */
  548.     kHIDUsage_Sim_Clutch        = 0xC6,                         /* Dynamic Value */
  549.     kHIDUsage_Sim_Shifter       = 0xC7,                         /* Dynamic Value */
  550.     kHIDUsage_Sim_Steering      = 0xC8,                         /* Dynamic Value */
  551.     kHIDUsage_Sim_TurretDirection = 0xC9,                       /* Dynamic Value */
  552.     kHIDUsage_Sim_BarrelElevation = 0xCA,                       /* Dynamic Value */
  553.     kHIDUsage_Sim_DivePlane     = 0xCB,                         /* Dynamic Value */
  554.     kHIDUsage_Sim_Ballast       = 0xCC,                         /* Dynamic Value */
  555.     kHIDUsage_Sim_BicycleCrank  = 0xCD,                         /* Dynamic Value */
  556.     kHIDUsage_Sim_HandleBars    = 0xCE,                         /* Dynamic Value */
  557.     kHIDUsage_Sim_FrontBrake    = 0xCF,                         /* Dynamic Value */
  558.     kHIDUsage_Sim_RearBrake     = 0xD0,                         /* Dynamic Value */
  559.                                                                 /* 0xD1 - 0xFFFF Reserved */
  560.     kHIDUsage_Sim_Reserved      = 0xFFFF
  561. };
  562. /* VR Page (0x03) */
  563. /* Virtual Reality controls depend on designators to identify the individual controls. Most of the following are */
  564. /* usages are applied to the collections of entities that comprise the actual device. */
  565. enum {
  566.     kHIDUsage_VR_Belt           = 0x01,                         /* Application Collection */
  567.     kHIDUsage_VR_BodySuit       = 0x02,                         /* Application Collection */
  568.     kHIDUsage_VR_Flexor         = 0x03,                         /* Physical Collection */
  569.     kHIDUsage_VR_Glove          = 0x04,                         /* Application Collection */
  570.     kHIDUsage_VR_HeadTracker    = 0x05,                         /* Physical Collection */
  571.     kHIDUsage_VR_HeadMountedDisplay = 0x06,                     /* Application Collection */
  572.     kHIDUsage_VR_HandTracker    = 0x07,                         /* Application Collection */
  573.     kHIDUsage_VR_Oculometer     = 0x08,                         /* Application Collection */
  574.     kHIDUsage_VR_Vest           = 0x09,                         /* Application Collection */
  575.     kHIDUsage_VR_AnimatronicDevice = 0x0A,                      /* Application Collection */
  576.                                                                 /* 0x0B - 0x1F Reserved */
  577.     kHIDUsage_VR_StereoEnable   = 0x20,                         /* On/Off Control */
  578.     kHIDUsage_VR_DisplayEnable  = 0x21,                         /* On/Off Control */
  579.                                                                 /* 0x22 - 0xFFFF Reserved */
  580.     kHIDUsage_VR_Reserved       = 0xFFFF
  581. };
  582. /* Sport Page (0x04) */
  583. enum {
  584.     kHIDUsage_Sprt_BaseballBat  = 0x01,                         /* Application Collection */
  585.     kHIDUsage_Sprt_GolfClub     = 0x02,                         /* Application Collection */
  586.     kHIDUsage_Sprt_RowingMachine = 0x03,                        /* Application Collection */
  587.     kHIDUsage_Sprt_Treadmill    = 0x04,                         /* Application Collection */
  588.                                                                 /* 0x05 - 0x2F Reserved */
  589.     kHIDUsage_Sprt_Oar          = 0x30,                         /* Dynamic Value */
  590.     kHIDUsage_Sprt_Slope        = 0x31,                         /* Dynamic Value */
  591.     kHIDUsage_Sprt_Rate         = 0x32,                         /* Dynamic Value */
  592.     kHIDUsage_Sprt_StickSpeed   = 0x33,                         /* Dynamic Value */
  593.     kHIDUsage_Sprt_StickFaceAngle = 0x34,                       /* Dynamic Value */
  594.     kHIDUsage_Sprt_StickHeelOrToe = 0x35,                       /* Dynamic Value */
  595.     kHIDUsage_Sprt_StickFollowThrough = 0x36,                   /* Dynamic Value */
  596.     kHIDUsage_Sprt_StickTempo   = 0x37,                         /* Dynamic Value */
  597.     kHIDUsage_Sprt_StickType    = 0x38,                         /* Named Array */
  598.     kHIDUsage_Sprt_StickHeight  = 0x39,                         /* Dynamic Value */
  599.                                                                 /* 0x3A - 0x4F Reserved */
  600.     kHIDUsage_Sprt_Putter       = 0x50,                         /* Selector */
  601.     kHIDUsage_Sprt_1Iron        = 0x51,                         /* Selector */
  602.     kHIDUsage_Sprt_2Iron        = 0x52,                         /* Selector */
  603.     kHIDUsage_Sprt_3Iron        = 0x53,                         /* Selector */
  604.     kHIDUsage_Sprt_4Iron        = 0x54,                         /* Selector */
  605.     kHIDUsage_Sprt_5Iron        = 0x55,                         /* Selector */
  606.     kHIDUsage_Sprt_6Iron        = 0x56,                         /* Selector */
  607.     kHIDUsage_Sprt_7Iron        = 0x57,                         /* Selector */
  608.     kHIDUsage_Sprt_8Iron        = 0x58,                         /* Selector */
  609.     kHIDUsage_Sprt_9Iron        = 0x59,                         /* Selector */
  610.     kHIDUsage_Sprt_10Iron       = 0x5A,                         /* Selector */
  611.     kHIDUsage_Sprt_11Iron       = 0x5B,                         /* Selector */
  612.     kHIDUsage_Sprt_SandWedge    = 0x5C,                         /* Selector */
  613.     kHIDUsage_Sprt_LoftWedge    = 0x5D,                         /* Selector */
  614.     kHIDUsage_Sprt_PowerWedge   = 0x5E,                         /* Selector */
  615.     kHIDUsage_Sprt_1Wood        = 0x5F,                         /* Selector */
  616.     kHIDUsage_Sprt_3Wood        = 0x60,                         /* Selector */
  617.     kHIDUsage_Sprt_5Wood        = 0x61,                         /* Selector */
  618.     kHIDUsage_Sprt_7Wood        = 0x62,                         /* Selector */
  619.     kHIDUsage_Sprt_9Wood        = 0x63,                         /* Selector */
  620.                                                                 /* 0x64 - 0xFFFF Reserved */
  621.     kHIDUsage_Sprt_Reserved     = 0xFFFF
  622. };
  623. /* Game Page (0x05) */
  624. enum {
  625.     kHIDUsage_Game_3DGameController = 0x01,                     /* Application Collection */
  626.     kHIDUsage_Game_PinballDevice = 0x02,                        /* Application Collection */
  627.     kHIDUsage_Game_GunDevice    = 0x03,                         /* Application Collection */
  628.                                                                 /* 0x04 - 0x1F Reserved */
  629.     kHIDUsage_Game_PointofView  = 0x20,                         /* Physical Collection */
  630.     kHIDUsage_Game_TurnRightOrLeft = 0x21,                      /* Dynamic Value */
  631.     kHIDUsage_Game_PitchUpOrDown = 0x22,                        /* Dynamic Value */
  632.     kHIDUsage_Game_RollRightOrLeft = 0x23,                      /* Dynamic Value */
  633.     kHIDUsage_Game_MoveRightOrLeft = 0x24,                      /* Dynamic Value */
  634.     kHIDUsage_Game_MoveForwardOrBackward = 0x25,                /* Dynamic Value */
  635.     kHIDUsage_Game_MoveUpOrDown = 0x26,                         /* Dynamic Value */
  636.     kHIDUsage_Game_LeanRightOrLeft = 0x27,                      /* Dynamic Value */
  637.     kHIDUsage_Game_LeanForwardOrBackward = 0x28,                /* Dynamic Value */
  638.     kHIDUsage_Game_HeightOfPOV  = 0x29,                         /* Dynamic Value */
  639.     kHIDUsage_Game_Flipper      = 0x2A,                         /* Momentary Control */
  640.     kHIDUsage_Game_SecondaryFlipper = 0x2B,                     /* Momentary Control */
  641.     kHIDUsage_Game_Bump         = 0x2C,                         /* Momentary Control */
  642.     kHIDUsage_Game_NewGame      = 0x2D,                         /* One-Shot Control */
  643.     kHIDUsage_Game_ShootBall    = 0x2E,                         /* One-Shot Control */
  644.     kHIDUsage_Game_Player       = 0x2F,                         /* One-Shot Control */
  645.     kHIDUsage_Game_GunBolt      = 0x30,                         /* On/Off Control */
  646.     kHIDUsage_Game_GunClip      = 0x31,                         /* On/Off Control */
  647.     kHIDUsage_Game_Gun          = 0x32,                         /* Selector */
  648.     kHIDUsage_Game_GunSingleShot = 0x33,                        /* Selector */
  649.     kHIDUsage_Game_GunBurst     = 0x34,                         /* Selector */
  650.     kHIDUsage_Game_GunAutomatic = 0x35,                         /* Selector */
  651.     kHIDUsage_Game_GunSafety    = 0x36,                         /* On/Off Control */
  652.     kHIDUsage_Game_GamepadFireOrJump = 0x37,                    /* Logical Collection */
  653.     kHIDUsage_Game_GamepadTrigger = 0x39,                       /* Logical Collection */
  654.                                                                 /* 0x3A - 0xFFFF Reserved */
  655.     kHIDUsage_Game_Reserved     = 0xFFFF
  656. };
  657. /* KeyboardOrKeypad Page (0x07) */
  658. /* This section is the Usage Page for key codes to be used in implementing a USB keyboard.  */
  659. /* A Boot Keyboard (84-, 101- or 104-key) should at a minimum support all associated usage codes as */
  660. /* indicated in the "Boot" column below. */
  661. /* The usage type of all key codes is Selectors (Sel), except for the modifier keys Keyboard Left Control (0x224) */
  662. /* to Keyboard Right GUI (0x231) which are Dynamic Flags (DV). */
  663. /* Note: A general note on Usages and languages: */
  664. /* Due to the variation of keyboards from language to language, it is not feasible to specify exact key mappings */
  665. /* for every language. Where this list is not specific for a key function in a language, the closest equivalent key */
  666. /* position should be used, so that a keyboard may be modified for a different language by simply printing different */
  667. /* keycaps. One example is the Y key on a North American keyboard. In Germany this is typically Z. Rather than changing */
  668. /* the keyboard firmware to put the Z Usage into that place in the descriptor list, the vendor should use the Y Usage on */
  669. /* both the North American and German keyboards. This continues to be the existing practice in the industry, in order to */
  670. /* minimize the number of changes to the electronics to accommodate otherlanguages. */
  671. enum {
  672.     kHIDUsage_KeyboardErrorRollOver = 0x01,                     /* ErrorRollOver */
  673.     kHIDUsage_KeyboardPOSTFail  = 0x02,                         /* POSTFail */
  674.     kHIDUsage_KeyboardErrorUndefined = 0x03,                    /* ErrorUndefined */
  675.     kHIDUsage_KeyboardA         = 0x04,                         /* a or A */
  676.     kHIDUsage_KeyboardB         = 0x05,                         /* b or B */
  677.     kHIDUsage_KeyboardC         = 0x06,                         /* c or C */
  678.     kHIDUsage_KeyboardD         = 0x07,                         /* d or D */
  679.     kHIDUsage_KeyboardE         = 0x08,                         /* e or E */
  680.     kHIDUsage_KeyboardF         = 0x09,                         /* f or F */
  681.     kHIDUsage_KeyboardG         = 0x0A,                         /* g or G */
  682.     kHIDUsage_KeyboardH         = 0x0B,                         /* h or H */
  683.     kHIDUsage_KeyboardI         = 0x0C,                         /* i or I */
  684.     kHIDUsage_KeyboardJ         = 0x0D,                         /* j or J */
  685.     kHIDUsage_KeyboardK         = 0x0E,                         /* k or K */
  686.     kHIDUsage_KeyboardL         = 0x0F,                         /* l or L */
  687.     kHIDUsage_KeyboardM         = 0x10,                         /* m or M */
  688.     kHIDUsage_KeyboardN         = 0x11,                         /* n or N */
  689.     kHIDUsage_KeyboardO         = 0x12,                         /* o or O */
  690.     kHIDUsage_KeyboardP         = 0x13,                         /* p or P */
  691.     kHIDUsage_KeyboardQ         = 0x14,                         /* q or Q */
  692.     kHIDUsage_KeyboardR         = 0x15,                         /* r or R */
  693.     kHIDUsage_KeyboardS         = 0x16,                         /* s or S */
  694.     kHIDUsage_KeyboardT         = 0x17,                         /* t or T */
  695.     kHIDUsage_KeyboardU         = 0x18,                         /* u or U */
  696.     kHIDUsage_KeyboardV         = 0x19,                         /* v or V */
  697.     kHIDUsage_KeyboardW         = 0x1A,                         /* w or W */
  698.     kHIDUsage_KeyboardX         = 0x1B,                         /* x or X */
  699.     kHIDUsage_KeyboardY         = 0x1C,                         /* y or Y */
  700.     kHIDUsage_KeyboardZ         = 0x1D,                         /* z or Z */
  701.     kHIDUsage_Keyboard1         = 0x1E,                         /* 1 or ! */
  702.     kHIDUsage_Keyboard2         = 0x1F,                         /* 2 or @ */
  703.     kHIDUsage_Keyboard3         = 0x20,                         /* 3 or # */
  704.     kHIDUsage_Keyboard4         = 0x21,                         /* 4 or $ */
  705.     kHIDUsage_Keyboard5         = 0x22,                         /* 5 or % */
  706.     kHIDUsage_Keyboard6         = 0x23,                         /* 6 or ^ */
  707.     kHIDUsage_Keyboard7         = 0x24,                         /* 7 or & */
  708.     kHIDUsage_Keyboard8         = 0x25,                         /* 8 or * */
  709.     kHIDUsage_Keyboard9         = 0x26,                         /* 9 or ( */
  710.     kHIDUsage_Keyboard0         = 0x27,                         /* 0 or ) */
  711.     kHIDUsage_KeyboardReturnOrEnter = 0x28,                     /* Return (Enter) */
  712.     kHIDUsage_KeyboardEscape    = 0x29,                         /* Escape */
  713.     kHIDUsage_KeyboardDeleteOrBackspace = 0x2A,                 /* Delete (Backspace) */
  714.     kHIDUsage_KeyboardTab       = 0x2B,                         /* Tab */
  715.     kHIDUsage_KeyboardSpacebar  = 0x2C,                         /* Spacebar */
  716.     kHIDUsage_KeyboardHyphen    = 0x2D,                         /* - or _ */
  717.     kHIDUsage_KeyboardEqualSign = 0x2E,                         /* = or + */
  718.     kHIDUsage_KeyboardOpenBracket = 0x2F,                       /* [ or { */
  719.     kHIDUsage_KeyboardCloseBracket = 0x30,                      /* ] or } */
  720.     kHIDUsage_KeyboardBackslash = 0x31,                         /*  or | */
  721.     kHIDUsage_KeyboardNonUSPound = 0x32,                        /* Non-US # or _ */
  722.     kHIDUsage_KeyboardSemicolon = 0x33,                         /* ; or : */
  723.     kHIDUsage_KeyboardQuote     = 0x34,                         /* ' or " */
  724.     kHIDUsage_KeyboardGraveAccentAndTilde = 0x35,               /* Grave Accent and Tilde */
  725.     kHIDUsage_KeyboardComma     = 0x36,                         /* , or < */
  726.     kHIDUsage_KeyboardPeriod    = 0x37,                         /* . or > */
  727.     kHIDUsage_KeyboardSlash     = 0x38,                         /* / or ? */
  728.     kHIDUsage_KeyboardCapsLock  = 0x39,                         /* Caps Lock */
  729.     kHIDUsage_KeyboardF1        = 0x3A,                         /* F1 */
  730.     kHIDUsage_KeyboardF2        = 0x3B,                         /* F2 */
  731.     kHIDUsage_KeyboardF3        = 0x3C,                         /* F3 */
  732.     kHIDUsage_KeyboardF4        = 0x3D,                         /* F4 */
  733.     kHIDUsage_KeyboardF5        = 0x3E,                         /* F5 */
  734.     kHIDUsage_KeyboardF6        = 0x3F,                         /* F6 */
  735.     kHIDUsage_KeyboardF7        = 0x40,                         /* F7 */
  736.     kHIDUsage_KeyboardF8        = 0x41,                         /* F8 */
  737.     kHIDUsage_KeyboardF9        = 0x42,                         /* F9 */
  738.     kHIDUsage_KeyboardF10       = 0x43,                         /* F10 */
  739.     kHIDUsage_KeyboardF11       = 0x44,                         /* F11 */
  740.     kHIDUsage_KeyboardF12       = 0x45,                         /* F12 */
  741.     kHIDUsage_KeyboardPrintScreen = 0x46,                       /* Print Screen */
  742.     kHIDUsage_KeyboardScrollLock = 0x47,                        /* Scroll Lock */
  743.     kHIDUsage_KeyboardPause     = 0x48,                         /* Pause */
  744.     kHIDUsage_KeyboardInsert    = 0x49,                         /* Insert */
  745.     kHIDUsage_KeyboardHome      = 0x4A,                         /* Home */
  746.     kHIDUsage_KeyboardPageUp    = 0x4B,                         /* Page Up */
  747.     kHIDUsage_KeyboardDeleteForward = 0x4C,                     /* Delete Forward */
  748.     kHIDUsage_KeyboardEnd       = 0x4D,                         /* End */
  749.     kHIDUsage_KeyboardPageDown  = 0x4E,                         /* Page Down */
  750.     kHIDUsage_KeyboardRightArrow = 0x4F,                        /* Right Arrow */
  751.     kHIDUsage_KeyboardLeftArrow = 0x50,                         /* Left Arrow */
  752.     kHIDUsage_KeyboardDownArrow = 0x51,                         /* Down Arrow */
  753.     kHIDUsage_KeyboardUpArrow   = 0x52,                         /* Up Arrow */
  754.     kHIDUsage_KeypadNumLock     = 0x53,                         /* Keypad NumLock or Clear */
  755.     kHIDUsage_KeypadSlash       = 0x54,                         /* Keypad / */
  756.     kHIDUsage_KeypadAsterisk    = 0x55,                         /* Keypad * */
  757.     kHIDUsage_KeypadHyphen      = 0x56,                         /* Keypad - */
  758.     kHIDUsage_KeypadPlus        = 0x57,                         /* Keypad + */
  759.     kHIDUsage_KeypadEnter       = 0x58,                         /* Keypad Enter */
  760.     kHIDUsage_Keypad1           = 0x59,                         /* Keypad 1 or End */
  761.     kHIDUsage_Keypad2           = 0x5A,                         /* Keypad 2 or Down Arrow */
  762.     kHIDUsage_Keypad3           = 0x5B,                         /* Keypad 3 or Page Down */
  763.     kHIDUsage_Keypad4           = 0x5C,                         /* Keypad 4 or Left Arrow */
  764.     kHIDUsage_Keypad5           = 0x5D,                         /* Keypad 5 */
  765.     kHIDUsage_Keypad6           = 0x5E,                         /* Keypad 6 or Right Arrow */
  766.     kHIDUsage_Keypad7           = 0x5F,                         /* Keypad 7 or Home */
  767.     kHIDUsage_Keypad8           = 0x60,                         /* Keypad 8 or Up Arrow */
  768.     kHIDUsage_Keypad9           = 0x61,                         /* Keypad 9 or Page Up */
  769.     kHIDUsage_Keypad0           = 0x62,                         /* Keypad 0 or Insert */
  770.     kHIDUsage_KeypadPeriod      = 0x63,                         /* Keypad . or Delete */
  771.     kHIDUsage_KeyboardNonUSBackslash = 0x64,                    /* Non-US  or | */
  772.     kHIDUsage_KeyboardApplication = 0x65,                       /* Application */
  773.     kHIDUsage_KeyboardPower     = 0x66,                         /* Power */
  774.     kHIDUsage_KeypadEqualSign   = 0x67,                         /* Keypad = */
  775.     kHIDUsage_KeyboardF13       = 0x68,                         /* F13 */
  776.     kHIDUsage_KeyboardF14       = 0x69,                         /* F14 */
  777.     kHIDUsage_KeyboardF15       = 0x6A,                         /* F15 */
  778.     kHIDUsage_KeyboardF16       = 0x6B,                         /* F16 */
  779.     kHIDUsage_KeyboardF17       = 0x6C,                         /* F17 */
  780.     kHIDUsage_KeyboardF18       = 0x6D,                         /* F18 */
  781.     kHIDUsage_KeyboardF19       = 0x6E,                         /* F19 */
  782.     kHIDUsage_KeyboardF20       = 0x6F,                         /* F20 */
  783.     kHIDUsage_KeyboardF21       = 0x70,                         /* F21 */
  784.     kHIDUsage_KeyboardF22       = 0x71,                         /* F22 */
  785.     kHIDUsage_KeyboardF23       = 0x72,                         /* F23 */
  786.     kHIDUsage_KeyboardF24       = 0x73,                         /* F24 */
  787.     kHIDUsage_KeyboardExecute   = 0x74,                         /* Execute */
  788.     kHIDUsage_KeyboardHelp      = 0x75,                         /* Help */
  789.     kHIDUsage_KeyboardMenu      = 0x76,                         /* Menu */
  790.     kHIDUsage_KeyboardSelect    = 0x77,                         /* Select */
  791.     kHIDUsage_KeyboardStop      = 0x78,                         /* Stop */
  792.     kHIDUsage_KeyboardAgain     = 0x79,                         /* Again */
  793.     kHIDUsage_KeyboardUndo      = 0x7A,                         /* Undo */
  794.     kHIDUsage_KeyboardCut       = 0x7B,                         /* Cut */
  795.     kHIDUsage_KeyboardCopy      = 0x7C,                         /* Copy */
  796.     kHIDUsage_KeyboardPaste     = 0x7D,                         /* Paste */
  797.     kHIDUsage_KeyboardFind      = 0x7E,                         /* Find */
  798.     kHIDUsage_KeyboardMute      = 0x7F,                         /* Mute */
  799.     kHIDUsage_KeyboardVolumeUp  = 0x80,                         /* Volume Up */
  800.     kHIDUsage_KeyboardVolumeDown = 0x81,                        /* Volume Down */
  801.     kHIDUsage_KeyboardLockingCapsLock = 0x82,                   /* Locking Caps Lock */
  802.     kHIDUsage_KeyboardLockingNumLock = 0x83,                    /* Locking Num Lock */
  803.     kHIDUsage_KeyboardLockingScrollLock = 0x84,                 /* Locking Scroll Lock */
  804.     kHIDUsage_KeypadComma       = 0x85,                         /* Keypad Comma */
  805.     kHIDUsage_KeypadEqualSignAS400 = 0x86,                      /* Keypad Equal Sign for AS/400 */
  806.     kHIDUsage_KeyboardInternational1 = 0x87,                    /* International1 */
  807.     kHIDUsage_KeyboardInternational2 = 0x88,                    /* International2 */
  808.     kHIDUsage_KeyboardInternational3 = 0x89,                    /* International3 */
  809.     kHIDUsage_KeyboardInternational4 = 0x8A,                    /* International4 */
  810.     kHIDUsage_KeyboardInternational5 = 0x8B,                    /* International5 */
  811.     kHIDUsage_KeyboardInternational6 = 0x8C,                    /* International6 */
  812.     kHIDUsage_KeyboardInternational7 = 0x8D,                    /* International7 */
  813.     kHIDUsage_KeyboardInternational8 = 0x8E,                    /* International8 */
  814.     kHIDUsage_KeyboardInternational9 = 0x8F,                    /* International9 */
  815.     kHIDUsage_KeyboardLANG1     = 0x90,                         /* LANG1 */
  816.     kHIDUsage_KeyboardLANG2     = 0x91,                         /* LANG2 */
  817.     kHIDUsage_KeyboardLANG3     = 0x92,                         /* LANG3 */
  818.     kHIDUsage_KeyboardLANG4     = 0x93,                         /* LANG4 */
  819.     kHIDUsage_KeyboardLANG5     = 0x94,                         /* LANG5 */
  820.     kHIDUsage_KeyboardLANG6     = 0x95,                         /* LANG6 */
  821.     kHIDUsage_KeyboardLANG7     = 0x96,                         /* LANG7 */
  822.     kHIDUsage_KeyboardLANG8     = 0x97,                         /* LANG8 */
  823.     kHIDUsage_KeyboardLANG9     = 0x98,                         /* LANG9 */
  824.     kHIDUsage_KeyboardAlternateErase = 0x99,                    /* AlternateErase */
  825.     kHIDUsage_KeyboardSysReqOrAttention = 0x9A,                 /* SysReq/Attention */
  826.     kHIDUsage_KeyboardCancel    = 0x9B,                         /* Cancel */
  827.     kHIDUsage_KeyboardClear     = 0x9C,                         /* Clear */
  828.     kHIDUsage_KeyboardPrior     = 0x9D,                         /* Prior */
  829.     kHIDUsage_KeyboardReturn    = 0x9E,                         /* Return */
  830.     kHIDUsage_KeyboardSeparator = 0x9F,                         /* Separator */
  831.     kHIDUsage_KeyboardOut       = 0xA0,                         /* Out */
  832.     kHIDUsage_KeyboardOper      = 0xA1,                         /* Oper */
  833.     kHIDUsage_KeyboardClearOrAgain = 0xA2,                      /* Clear/Again */
  834.     kHIDUsage_KeyboardCrSelOrProps = 0xA3,                      /* CrSel/Props */
  835.     kHIDUsage_KeyboardExSel     = 0xA4,                         /* ExSel */
  836.                                                                 /* 0xA5-0xDF Reserved */
  837.     kHIDUsage_KeyboardLeftControl = 0xE0,                       /* Left Control */
  838.     kHIDUsage_KeyboardLeftShift = 0xE1,                         /* Left Shift */
  839.     kHIDUsage_KeyboardLeftAlt   = 0xE2,                         /* Left Alt */
  840.     kHIDUsage_KeyboardLeftGUI   = 0xE3,                         /* Left GUI */
  841.     kHIDUsage_KeyboardRightControl = 0xE4,                      /* Right Control */
  842.     kHIDUsage_KeyboardRightShift = 0xE5,                        /* Right Shift */
  843.     kHIDUsage_KeyboardRightAlt  = 0xE6,                         /* Right Alt */
  844.     kHIDUsage_KeyboardRightGUI  = 0xE7,                         /* Right GUI */
  845.                                                                 /* 0xE8-0xFFFF Reserved */
  846.     kHIDUsage_Keyboard_Reserved = 0xFFFF
  847. };
  848. /* LEDs Page (0x08) */
  849. /* An LED or indicator is implemented as an On/Off Control (OOF) using the "Single button toggle" mode, 
  850. |* where a value of 1 will turn on the indicator, and a value of 0 will turn it off. The exceptions are described below. */
  851. enum {
  852.     kHIDUsage_LED_NumLock       = 0x01,                         /* On/Off Control */
  853.     kHIDUsage_LED_CapsLock      = 0x02,                         /* On/Off Control */
  854.     kHIDUsage_LED_ScrollLock    = 0x03,                         /* On/Off Control */
  855.     kHIDUsage_LED_Compose       = 0x04,                         /* On/Off Control */
  856.     kHIDUsage_LED_Kana          = 0x05,                         /* On/Off Control */
  857.     kHIDUsage_LED_Power         = 0x06,                         /* On/Off Control */
  858.     kHIDUsage_LED_Shift         = 0x07,                         /* On/Off Control */
  859.     kHIDUsage_LED_DoNotDisturb  = 0x08,                         /* On/Off Control */
  860.     kHIDUsage_LED_Mute          = 0x09,                         /* On/Off Control */
  861.     kHIDUsage_LED_ToneEnable    = 0x0A,                         /* On/Off Control */
  862.     kHIDUsage_LED_HighCutFilter = 0x0B,                         /* On/Off Control */
  863.     kHIDUsage_LED_LowCutFilter  = 0x0C,                         /* On/Off Control */
  864.     kHIDUsage_LED_EqualizerEnable = 0x0D,                       /* On/Off Control */
  865.     kHIDUsage_LED_SoundFieldOn  = 0x0E,                         /* On/Off Control */
  866.     kHIDUsage_LED_SurroundOn    = 0x0F,                         /* On/Off Control */
  867.     kHIDUsage_LED_Repeat        = 0x10,                         /* On/Off Control */
  868.     kHIDUsage_LED_Stereo        = 0x11,                         /* On/Off Control */
  869.     kHIDUsage_LED_SamplingRateDetect = 0x12,                    /* On/Off Control */
  870.     kHIDUsage_LED_Spinning      = 0x13,                         /* On/Off Control */
  871.     kHIDUsage_LED_CAV           = 0x14,                         /* On/Off Control */
  872.     kHIDUsage_LED_CLV           = 0x15,                         /* On/Off Control */
  873.     kHIDUsage_LED_RecordingFormatDetect = 0x16,                 /* On/Off Control */
  874.     kHIDUsage_LED_OffHook       = 0x17,                         /* On/Off Control */
  875.     kHIDUsage_LED_Ring          = 0x18,                         /* On/Off Control */
  876.     kHIDUsage_LED_MessageWaiting = 0x19,                        /* On/Off Control */
  877.     kHIDUsage_LED_DataMode      = 0x1A,                         /* On/Off Control */
  878.     kHIDUsage_LED_BatteryOperation = 0x1B,                      /* On/Off Control */
  879.     kHIDUsage_LED_BatteryOK     = 0x1C,                         /* On/Off Control */
  880.     kHIDUsage_LED_BatteryLow    = 0x1D,                         /* On/Off Control */
  881.     kHIDUsage_LED_Speaker       = 0x1E,                         /* On/Off Control */
  882.     kHIDUsage_LED_HeadSet       = 0x1F,                         /* On/Off Control */
  883.     kHIDUsage_LED_Hold          = 0x20,                         /* On/Off Control */
  884.     kHIDUsage_LED_Microphone    = 0x21,                         /* On/Off Control */
  885.     kHIDUsage_LED_Coverage      = 0x22,                         /* On/Off Control */
  886.     kHIDUsage_LED_NightMode     = 0x23,                         /* On/Off Control */
  887.     kHIDUsage_LED_SendCalls     = 0x24,                         /* On/Off Control */
  888.     kHIDUsage_LED_CallPickup    = 0x25,                         /* On/Off Control */
  889.     kHIDUsage_LED_Conference    = 0x26,                         /* On/Off Control */
  890.     kHIDUsage_LED_StandBy       = 0x27,                         /* On/Off Control */
  891.     kHIDUsage_LED_CameraOn      = 0x28,                         /* On/Off Control */
  892.     kHIDUsage_LED_CameraOff     = 0x29,                         /* On/Off Control */
  893.     kHIDUsage_LED_OnLine        = 0x2A,                         /* On/Off Control */
  894.     kHIDUsage_LED_OffLine       = 0x2B,                         /* On/Off Control */
  895.     kHIDUsage_LED_Busy          = 0x2C,                         /* On/Off Control */
  896.     kHIDUsage_LED_Ready         = 0x2D,                         /* On/Off Control */
  897.     kHIDUsage_LED_PaperOut      = 0x2E,                         /* On/Off Control */
  898.     kHIDUsage_LED_PaperJam      = 0x2F,                         /* On/Off Control */
  899.     kHIDUsage_LED_Remote        = 0x30,                         /* On/Off Control */
  900.     kHIDUsage_LED_Forward       = 0x31,                         /* On/Off Control */
  901.     kHIDUsage_LED_Reverse       = 0x32,                         /* On/Off Control */
  902.     kHIDUsage_LED_Stop          = 0x33,                         /* On/Off Control */
  903.     kHIDUsage_LED_Rewind        = 0x34,                         /* On/Off Control */
  904.     kHIDUsage_LED_FastForward   = 0x35,                         /* On/Off Control */
  905.     kHIDUsage_LED_Play          = 0x36,                         /* On/Off Control */
  906.     kHIDUsage_LED_Pause         = 0x37,                         /* On/Off Control */
  907.     kHIDUsage_LED_Record        = 0x38,                         /* On/Off Control */
  908.     kHIDUsage_LED_Error         = 0x39,                         /* On/Off Control */
  909.     kHIDUsage_LED_Usage         = 0x3A,                         /* Selector */
  910.     kHIDUsage_LED_UsageInUseIndicator = 0x3B,                   /* Usage Switch */
  911.     kHIDUsage_LED_UsageMultiModeIndicator = 0x3C,               /* Usage Modifier */
  912.     kHIDUsage_LED_IndicatorOn   = 0x3D,                         /* Selector */
  913.     kHIDUsage_LED_IndicatorFlash = 0x3E,                        /* Selector */
  914.     kHIDUsage_LED_IndicatorSlowBlink = 0x3F,                    /* Selector */
  915.     kHIDUsage_LED_IndicatorFastBlink = 0x40,                    /* Selector */
  916.     kHIDUsage_LED_IndicatorOff  = 0x41,                         /* Selector */
  917.     kHIDUsage_LED_FlashOnTime   = 0x42,                         /* Dynamic Value */
  918.     kHIDUsage_LED_SlowBlinkOnTime = 0x43,                       /* Dynamic Value */
  919.     kHIDUsage_LED_SlowBlinkOffTime = 0x44,                      /* Dynamic Value */
  920.     kHIDUsage_LED_FastBlinkOnTime = 0x45,                       /* Dynamic Value */
  921.     kHIDUsage_LED_FastBlinkOffTime = 0x46,                      /* Dynamic Value */
  922.     kHIDUsage_LED_UsageIndicatorColor = 0x47,                   /* Usage Modifier */
  923.     kHIDUsage_LED_IndicatorRed  = 0x48,                         /* Selector */
  924.     kHIDUsage_LED_IndicatorGreen = 0x49,                        /* Selector */
  925.     kHIDUsage_LED_IndicatorAmber = 0x4A,                        /* Selector */
  926.     kHIDUsage_LED_GenericIndicator = 0x4B,                      /* On/Off Control */
  927.     kHIDUsage_LED_SystemSuspend = 0x4C,                         /* On/Off Control */
  928.     kHIDUsage_LED_ExternalPowerConnected = 0x4D,                /* On/Off Control */
  929.                                                                 /* 0x4E - 0xFFFF Reserved */
  930.     kHIDUsage_LED_Reserved      = 0xFFFF
  931. };
  932. /* Button Page (0x09) */
  933. /* The Button page is the first place an application should look for user selection controls. System graphical user */
  934. /* interfaces typically employ a pointer and a set of hierarchical selectors to select, move and otherwise manipulate */
  935. /* their environment. For these purposes the following assignment of significance can be applied to the Button usages: */
  936. /* o Button 1, Primary Button. Used for object selecting, dragging, and double click activation. On MacOS, this is the 
  937. |*   only button. Microsoft operating systems call this a logical left button, because it */
  938. /*   is not necessarily physically located on the left of the pointing device. */
  939. /* o Button 2, Secondary Button. Used by newer graphical user interfaces to browse object properties. Exposed by systems */
  940. /*   to applications that typically assign application-specific functionality. */
  941. /* o Button 3, Tertiary Button. Optional control. Exposed to applications, but seldom assigned functionality due to prevalence */
  942. /*   of two- and one-button devices. */
  943. /* o Buttons 4 -55. As the button number increases, its significance as a selector decreases. */
  944. /* In many ways the assignment of button numbers is similar to the assignment of Effort in Physical descriptors. */
  945. /* Button 1 would be used to define the button a finger rests on when the hand is in the "at rest" position, that is, virtually */
  946. /* no effort is required by the user to activate the button. Button values increment as the finger has to stretch to reach a */
  947. /* control. See Section 6.2.3, "Physical Descriptors," in the HID Specification for methods of further qualifying buttons. */
  948. enum {
  949.     kHIDUsage_Button_1          = 0x01,                         /* (primary/trigger) */
  950.     kHIDUsage_Button_2          = 0x02,                         /* (secondary) */
  951.     kHIDUsage_Button_3          = 0x03,                         /* (tertiary) */
  952.     kHIDUsage_Button_4          = 0x04,                         /* 4th button */
  953.                                                                 /* ... */
  954.     kHIDUsage_Button_65535      = 0xFFFF
  955. };
  956. /* Ordinal Page (0x0A) */
  957. /* The Ordinal page allows multiple instances of a control or sets of controls to be declared without requiring individual */
  958. /* enumeration in the native usage page. For example, it is not necessary to declare usages of Pointer 1, Pointer 2, and so */
  959. /* forth on the Generic Desktop page. When parsed, the ordinal instance number is, in essence, concatenated to the usages */
  960. /* attached to the encompassing collection to create Pointer 1, Pointer 2, and so forth. */
  961. /* For an example, see Section A.5, "Multiple Instances of a Control," in Appendix A, "Usage Examples." By convention, */
  962. /* an Ordinal collection is placed inside the collection for which it is declaring multiple instances. */
  963. /* Instances do not have to be identical. */
  964. enum {
  965.                                                                 /* 0x00 Reserved */
  966.     kHIDUsage_Ord_Instance1     = 0x01,                         /* Usage Modifier */
  967.     kHIDUsage_Ord_Instance2     = 0x02,                         /* Usage Modifier */
  968.     kHIDUsage_Ord_Instance3     = 0x03,                         /* Usage Modifier */
  969.     kHIDUsage_Ord_Instance4     = 0x04,                         /* Usage Modifier */
  970.     kHIDUsage_Ord_Instance65535 = 0xFFFF                        /* Usage Modifier */
  971. };
  972. /* Telephony Page (0x0B) */
  973. /* This usage page defines the keytop and control usages for telephony devices. */
  974. /* Indicators on a phone are handled by wrapping them in LED: Usage In Use Indicator and LED: Usage Selected Indicator */
  975. /* usages. For example, a message-indicator LED would be identified by a Telephony: Message usage declared as a Feature */
  976. /* or Output in a LED: Usage In Use Indicator collection. */
  977. /* See Section 14, "Consumer Page (0x0C)," for audio volume and tone controls. */
  978. enum {
  979.     kHIDUsage_Tfon_Phone        = 0x01,                         /* Application Collection */
  980.     kHIDUsage_Tfon_AnsweringMachine = 0x02,                     /* Application Collection */
  981.     kHIDUsage_Tfon_MessageControls = 0x03,                      /* Logical Collection */
  982.     kHIDUsage_Tfon_Handset      = 0x04,                         /* Logical Collection */
  983.     kHIDUsage_Tfon_Headset      = 0x05,                         /* Logical Collection */
  984.     kHIDUsage_Tfon_TelephonyKeyPad = 0x06,                      /* Named Array */
  985.     kHIDUsage_Tfon_ProgrammableButton = 0x07,                   /* Named Array */
  986.                                                                 /* 0x08 - 0x1F Reserved */
  987.     kHIDUsage_Tfon_HookSwitch   = 0x20,                         /* On/Off Control */
  988.     kHIDUsage_Tfon_Flash        = 0x21,                         /* Momentary Control */
  989.     kHIDUsage_Tfon_Feature      = 0x22,                         /* One-Shot Control */
  990.     kHIDUsage_Tfon_Hold         = 0x23,                         /* On/Off Control */
  991.     kHIDUsage_Tfon_Redial       = 0x24,                         /* One-Shot Control */
  992.     kHIDUsage_Tfon_Transfer     = 0x25,                         /* One-Shot Control */
  993.     kHIDUsage_Tfon_Drop         = 0x26,                         /* One-Shot Control */
  994.     kHIDUsage_Tfon_Park         = 0x27,                         /* On/Off Control */
  995.     kHIDUsage_Tfon_ForwardCalls = 0x28,                         /* On/Off Control */
  996.     kHIDUsage_Tfon_AlternateFunction = 0x29,                    /* Momentary Control */
  997.     kHIDUsage_Tfon_Line         = 0x2A,                         /* One-Shot Control */
  998.     kHIDUsage_Tfon_SpeakerPhone = 0x2B,                         /* On/Off Control */
  999.     kHIDUsage_Tfon_Conference   = 0x2C,                         /* On/Off Control */
  1000.     kHIDUsage_Tfon_RingEnable   = 0x2D,                         /* On/Off Control */
  1001.     kHIDUsage_Tfon_Ring         = 0x2E,                         /* Selector */
  1002.     kHIDUsage_Tfon_PhoneMute    = 0x2F,                         /* On/Off Control */
  1003.     kHIDUsage_Tfon_CallerID     = 0x30,                         /* Momentary Control */
  1004.                                                                 /* 0x31 - 0x4F Reserved */
  1005.     kHIDUsage_Tfon_SpeedDial    = 0x50,                         /* One-Shot Control */
  1006.     kHIDUsage_Tfon_StoreNumber  = 0x51,                         /* One-Shot Control */
  1007.     kHIDUsage_Tfon_RecallNumber = 0x52,                         /* One-Shot Control */
  1008.     kHIDUsage_Tfon_PhoneDirectory = 0x53,                       /* On/Off Control */
  1009.                                                                 /* 0x54 - 0x6F Reserved */
  1010.     kHIDUsage_Tfon_VoiceMail    = 0x70,                         /* On/Off Control */
  1011.     kHIDUsage_Tfon_ScreenCalls  = 0x71,                         /* On/Off Control */
  1012.     kHIDUsage_Tfon_DoNotDisturb = 0x72,                         /* On/Off Control */
  1013.     kHIDUsage_Tfon_Message      = 0x73,                         /* One-Shot Control */
  1014.     kHIDUsage_Tfon_AnswerOnOrOff = 0x74,                        /* On/Off Control */
  1015.                                                                 /* 0x75 - 0x8F Reserved */
  1016.     kHIDUsage_Tfon_InsideDialTone = 0x90,                       /* Momentary Control */
  1017.     kHIDUsage_Tfon_OutsideDialTone = 0x91,                      /* Momentary Control */
  1018.     kHIDUsage_Tfon_InsideRingTone = 0x92,                       /* Momentary Control */
  1019.     kHIDUsage_Tfon_OutsideRingTone = 0x93,                      /* Momentary Control */
  1020.     kHIDUsage_Tfon_PriorityRingTone = 0x94,                     /* Momentary Control */
  1021.     kHIDUsage_Tfon_InsideRingback = 0x95,                       /* Momentary Control */
  1022.     kHIDUsage_Tfon_PriorityRingback = 0x96,                     /* Momentary Control */
  1023.     kHIDUsage_Tfon_LineBusyTone = 0x97,                         /* Momentary Control */
  1024.     kHIDUsage_Tfon_ReorderTone  = 0x98,                         /* Momentary Control */
  1025.     kHIDUsage_Tfon_CallWaitingTone = 0x99,                      /* Momentary Control */
  1026.     kHIDUsage_Tfon_ConfirmationTone1 = 0x9A,                    /* Momentary Control */
  1027.     kHIDUsage_Tfon_ConfirmationTone2 = 0x9B,                    /* Momentary Control */
  1028.     kHIDUsage_Tfon_TonesOff     = 0x9C,                         /* On/Off Control */
  1029.     kHIDUsage_Tfon_OutsideRingback = 0x9D,                      /* Momentary Control */
  1030.                                                                 /* 0x9E - 0xAF Reserved */
  1031.     kHIDUsage_Tfon_PhoneKey0    = 0xB0,                         /* Selector/One-Shot Control */
  1032.     kHIDUsage_Tfon_PhoneKey1    = 0xB1,                         /* Selector/One-Shot Control */
  1033.     kHIDUsage_Tfon_PhoneKey2    = 0xB2,                         /* Selector/One-Shot Control */
  1034.     kHIDUsage_Tfon_PhoneKey3    = 0xB3,                         /* Selector/One-Shot Control */
  1035.     kHIDUsage_Tfon_PhoneKey4    = 0xB4,                         /* Selector/One-Shot Control */
  1036.     kHIDUsage_Tfon_PhoneKey5    = 0xB5,                         /* Selector/One-Shot Control */
  1037.     kHIDUsage_Tfon_PhoneKey6    = 0xB6,                         /* Selector/One-Shot Control */
  1038.     kHIDUsage_Tfon_PhoneKey7    = 0xB7,                         /* Selector/One-Shot Control */
  1039.     kHIDUsage_Tfon_PhoneKey8    = 0xB8,                         /* Selector/One-Shot Control */
  1040.     kHIDUsage_Tfon_PhoneKey9    = 0xB9,                         /* Selector/One-Shot Control */
  1041.     kHIDUsage_Tfon_PhoneKeyStar = 0xBA,                         /* Selector/One-Shot Control */
  1042.     kHIDUsage_Tfon_PhoneKeyPound = 0xBB,                        /* Selector/One-Shot Control */
  1043.     kHIDUsage_Tfon_PhoneKeyA    = 0xBC,                         /* Selector/One-Shot Control */
  1044.     kHIDUsage_Tfon_PhoneKeyB    = 0xBD,                         /* Selector/One-Shot Control */
  1045.     kHIDUsage_Tfon_PhoneKeyC    = 0xBE,                         /* Selector/One-Shot Control */
  1046.     kHIDUsage_Tfon_PhoneKeyD    = 0xBF,                         /* Selector/One-Shot Control */
  1047.                                                                 /* 0xC0 - 0xFFFF Reserved */
  1048.     kHIDUsage_TFon_Reserved     = 0xFFFF
  1049. };
  1050. /* Consumer Page (0x0C) */
  1051. /* All controls on the Consumer page are application-specific. That is, they affect a specific device, not the system as a whole. */
  1052. enum {
  1053.     kHIDUsage_Csmr_ConsumerControl = 0x01,                      /* Application Collection */
  1054.     kHIDUsage_Csmr_NumericKeyPad = 0x02,                        /* Named Array */
  1055.     kHIDUsage_Csmr_ProgrammableButtons = 0x03,                  /* Named Array */
  1056.                                                                 /* 0x03 - 0x1F Reserved */
  1057.     kHIDUsage_Csmr_Plus10       = 0x20,                         /* One-Shot Control */
  1058.     kHIDUsage_Csmr_Plus100      = 0x21,                         /* One-Shot Control */
  1059.     kHIDUsage_Csmr_AMOrPM       = 0x22,                         /* One-Shot Control */
  1060.                                                                 /* 0x23 - 0x3F Reserved */
  1061.     kHIDUsage_Csmr_Power        = 0x30,                         /* On/Off Control */
  1062.     kHIDUsage_Csmr_Reset        = 0x31,                         /* One-Shot Control */
  1063.     kHIDUsage_Csmr_Sleep        = 0x32,                         /* One-Shot Control */
  1064.     kHIDUsage_Csmr_SleepAfter   = 0x33,                         /* One-Shot Control */
  1065.     kHIDUsage_Csmr_SleepMode    = 0x34,                         /* Re-Trigger Control */
  1066.     kHIDUsage_Csmr_Illumination = 0x35,                         /* On/Off Control */
  1067.     kHIDUsage_Csmr_FunctionButtons = 0x36,                      /* Named Array */
  1068.                                                                 /* 0x37 - 0x3F Reserved */
  1069.     kHIDUsage_Csmr_Menu         = 0x40,                         /* On/Off Control */
  1070.     kHIDUsage_Csmr_MenuPick     = 0x41,                         /* One-Shot Control */
  1071.     kHIDUsage_Csmr_MenuUp       = 0x42,                         /* One-Shot Control */
  1072.     kHIDUsage_Csmr_MenuDown     = 0x43,                         /* One-Shot Control */
  1073.     kHIDUsage_Csmr_MenuLeft     = 0x44,                         /* One-Shot Control */
  1074.     kHIDUsage_Csmr_MenuRight    = 0x45,                         /* One-Shot Control */
  1075.     kHIDUsage_Csmr_MenuEscape   = 0x46,                         /* One-Shot Control */
  1076.     kHIDUsage_Csmr_MenuValueIncrease = 0x47,                    /* One-Shot Control */
  1077.     kHIDUsage_Csmr_MenuValueDecrease = 0x48,                    /* One-Shot Control */
  1078.                                                                 /* 0x49 - 0x5F Reserved */
  1079.     kHIDUsage_Csmr_DataOnScreen = 0x60,                         /* On/Off Control */
  1080.     kHIDUsage_Csmr_ClosedCaption = 0x61,                        /* On/Off Control */
  1081.     kHIDUsage_Csmr_ClosedCaptionSelect = 0x62,                  /* Selector */
  1082.     kHIDUsage_Csmr_VCROrTV      = 0x63,                         /* On/Off Control */
  1083.     kHIDUsage_Csmr_BroadcastMode = 0x64,                        /* One-Shot Control */
  1084.     kHIDUsage_Csmr_Snapshot     = 0x65,                         /* One-Shot Control */
  1085.     kHIDUsage_Csmr_Still        = 0x66,                         /* One-Shot Control */
  1086.                                                                 /* 0x67 - 0x7F Reserved */
  1087.     kHIDUsage_Csmr_Selection    = 0x80,                         /* Named Array */
  1088.     kHIDUsage_Csmr_Assign       = 0x81,                         /* Selector */
  1089.     kHIDUsage_Csmr_ModeStep     = 0x82,                         /* One-Shot Control */
  1090.     kHIDUsage_Csmr_RecallLast   = 0x83,                         /* One-Shot Control */
  1091.     kHIDUsage_Csmr_EnterChannel = 0x84,                         /* One-Shot Control */
  1092.     kHIDUsage_Csmr_OrderMovie   = 0x85,                         /* One-Shot Control */
  1093.     kHIDUsage_Csmr_Channel      = 0x86,                         /* Linear Control */
  1094.     kHIDUsage_Csmr_MediaSelection = 0x87,                       /* Selector */
  1095.     kHIDUsage_Csmr_MediaSelectComputer = 0x88,                  /* Selector */
  1096.     kHIDUsage_Csmr_MediaSelectTV = 0x89,                        /* Selector */
  1097.     kHIDUsage_Csmr_MediaSelectWWW = 0x8A,                       /* Selector */
  1098.     kHIDUsage_Csmr_MediaSelectDVD = 0x8B,                       /* Selector */
  1099.     kHIDUsage_Csmr_MediaSelectTelephone = 0x8C,                 /* Selector */
  1100.     kHIDUsage_Csmr_MediaSelectProgramGuide = 0x8D,              /* Selector */
  1101.     kHIDUsage_Csmr_MediaSelectVideoPhone = 0x8E,                /* Selector */
  1102.     kHIDUsage_Csmr_MediaSelectGames = 0x8F,                     /* Selector */
  1103.     kHIDUsage_Csmr_MediaSelectMessages = 0x90,                  /* Selector */
  1104.     kHIDUsage_Csmr_MediaSelectCD = 0x91,                        /* Selector */
  1105.     kHIDUsage_Csmr_MediaSelectVCR = 0x92,                       /* Selector */
  1106.     kHIDUsage_Csmr_MediaSelectTuner = 0x93,                     /* Selector */
  1107.     kHIDUsage_Csmr_Quit         = 0x94,                         /* One-Shot Control */
  1108.     kHIDUsage_Csmr_Help         = 0x95,                         /* On/Off Control */
  1109.     kHIDUsage_Csmr_MediaSelectTape = 0x96,                      /* Selector */
  1110.     kHIDUsage_Csmr_MediaSelectCable = 0x97,                     /* Selector */
  1111.     kHIDUsage_Csmr_MediaSelectSatellite = 0x98,                 /* Selector */
  1112.     kHIDUsage_Csmr_MediaSelectSecurity = 0x99,                  /* Selector */
  1113.     kHIDUsage_Csmr_MediaSelectHome = 0x9A,                      /* Selector */
  1114.     kHIDUsage_Csmr_MediaSelectCall = 0x9B,                      /* Selector */
  1115.     kHIDUsage_Csmr_ChannelIncrement = 0x9C,                     /* One-Shot Control */
  1116.     kHIDUsage_Csmr_ChannelDecrement = 0x9D,                     /* One-Shot Control */
  1117.     kHIDUsage_Csmr_Media        = 0x9E,                         /* Selector */
  1118.                                                                 /* 0x9F Reserved */
  1119.     kHIDUsage_Csmr_VCRPlus      = 0xA0,                         /* One-Shot Control */
  1120.     kHIDUsage_Csmr_Once         = 0xA1,                         /* One-Shot Control */
  1121.     kHIDUsage_Csmr_Daily        = 0xA2,                         /* One-Shot Control */
  1122.     kHIDUsage_Csmr_Weekly       = 0xA3,                         /* One-Shot Control */
  1123.     kHIDUsage_Csmr_Monthly      = 0xA4,                         /* One-Shot Control */
  1124.                                                                 /* 0xA5 - 0xAF Reserved */
  1125.     kHIDUsage_Csmr_Play         = 0xB0,                         /* On/Off Control */
  1126.     kHIDUsage_Csmr_Pause        = 0xB1,                         /* On/Off Control */
  1127.     kHIDUsage_Csmr_Record       = 0xB2,                         /* On/Off Control */
  1128.     kHIDUsage_Csmr_FastForward  = 0xB3,                         /* On/Off Control */
  1129.     kHIDUsage_Csmr_Rewind       = 0xB4,                         /* On/Off Control */
  1130.     kHIDUsage_Csmr_ScanNextTrack = 0xB5,                        /* One-Shot Control */
  1131.     kHIDUsage_Csmr_ScanPreviousTrack = 0xB6,                    /* One-Shot Control */
  1132.     kHIDUsage_Csmr_Stop         = 0xB7,                         /* One-Shot Control */
  1133.     kHIDUsage_Csmr_Eject        = 0xB8,                         /* One-Shot Control */
  1134.     kHIDUsage_Csmr_RandomPlay   = 0xB9,                         /* On/Off Control */
  1135.     kHIDUsage_Csmr_SelectDisc   = 0xBA,                         /* Named Array */
  1136.     kHIDUsage_Csmr_EnterDisc    = 0xBB,                         /* Momentary Control */
  1137.     kHIDUsage_Csmr_Repeat       = 0xBC,                         /* One-Shot Control */
  1138.     kHIDUsage_Csmr_Tracking     = 0xBD,                         /* Linear Control */
  1139.     kHIDUsage_Csmr_TrackNormal  = 0xBE,                         /* One-Shot Control */
  1140.     kHIDUsage_Csmr_SlowTracking = 0xBF,                         /* Linear Control */
  1141.     kHIDUsage_Csmr_FrameForward = 0xC0,                         /* Re-Trigger Control */
  1142.     kHIDUsage_Csmr_FrameBack    = 0xC1,                         /* Re-Trigger Control */
  1143.     kHIDUsage_Csmr_Mark         = 0xC2,                         /* One-Shot Control */
  1144.     kHIDUsage_Csmr_ClearMark    = 0xC3,                         /* One-Shot Control */
  1145.     kHIDUsage_Csmr_RepeatFromMark = 0xC4,                       /* On/Off Control */
  1146.     kHIDUsage_Csmr_ReturnToMark = 0xC5,                         /* One-Shot Control */
  1147.     kHIDUsage_Csmr_SearchMarkForward = 0xC6,                    /* One-Shot Control */
  1148.     kHIDUsage_Csmr_SearchMarkBackwards = 0xC7,                  /* One-Shot Control */
  1149.     kHIDUsage_Csmr_CounterReset = 0xC8,                         /* One-Shot Control */
  1150.     kHIDUsage_Csmr_ShowCounter  = 0xC9,                         /* One-Shot Control */
  1151.     kHIDUsage_Csmr_TrackingIncrement = 0xCA,                    /* Re-Trigger Control */
  1152.     kHIDUsage_Csmr_TrackingDecrement = 0xCB,                    /* Re-Trigger Control */
  1153.     kHIDUsage_Csmr_StopOrEject  = 0xCC,                         /* One-Shot Control */
  1154.     kHIDUsage_Csmr_PlayOrPause  = 0xCD,                         /* One-Shot Control */
  1155.     kHIDUsage_Csmr_PlayOrSkip   = 0xCE,                         /* One-Shot Control */
  1156.                                                                 /* 0xCF - 0xDF Reserved */
  1157.     kHIDUsage_Csmr_Volume       = 0xE0,                         /* Linear Control */
  1158.     kHIDUsage_Csmr_Balance      = 0xE1,                         /* Linear Control */
  1159.     kHIDUsage_Csmr_Mute         = 0xE2,                         /* On/Off Control */
  1160.     kHIDUsage_Csmr_Bass         = 0xE3,                         /* Linear Control */
  1161.     kHIDUsage_Csmr_Treble       = 0xE4,                         /* Linear Control */
  1162.     kHIDUsage_Csmr_BassBoost    = 0xE5,                         /* On/Off Control */
  1163.     kHIDUsage_Csmr_SurroundMode = 0xE6,                         /* One-Shot Control */
  1164.     kHIDUsage_Csmr_Loudness     = 0xE7,                         /* On/Off Control */
  1165.     kHIDUsage_Csmr_MPX          = 0xE8,                         /* On/Off Control */
  1166.     kHIDUsage_Csmr_VolumeIncrement = 0xE9,                      /* Re-Trigger Control */
  1167.     kHIDUsage_Csmr_VolumeDecrement = 0xEA,                      /* Re-Trigger Control */
  1168.                                                                 /* 0xEB - 0xEF Reserved */
  1169.     kHIDUsage_Csmr_Speed        = 0xF0,                         /* Selector */
  1170.     kHIDUsage_Csmr_PlaybackSpeed = 0xF1,                        /* Named Array */
  1171.     kHIDUsage_Csmr_StandardPlay = 0xF2,                         /* Selector */
  1172.     kHIDUsage_Csmr_LongPlay     = 0xF3,                         /* Selector */
  1173.     kHIDUsage_Csmr_ExtendedPlay = 0xF4,                         /* Selector */
  1174.     kHIDUsage_Csmr_Slow         = 0xF5,                         /* One-Shot Control */
  1175.                                                                 /* 0xF6 - 0xFF Reserved */
  1176.     kHIDUsage_Csmr_FanEnable    = 0x0100,                       /* On/Off Control */
  1177.     kHIDUsage_Csmr_FanSpeed     = 0x0101,                       /* Linear Control */
  1178.     kHIDUsage_Csmr_LightEnable  = 0x0102,                       /* On/Off Control */
  1179.     kHIDUsage_Csmr_LightIlluminationLevel = 0x0103,             /* Linear Control */
  1180.     kHIDUsage_Csmr_ClimateControlEnable = 0x0104,               /* On/Off Control */
  1181.     kHIDUsage_Csmr_RoomTemperature = 0x0105,                    /* Linear Control */
  1182.     kHIDUsage_Csmr_SecurityEnable = 0x0106,                     /* On/Off Control */
  1183.     kHIDUsage_Csmr_FireAlarm    = 0x0107,                       /* One-Shot Control */
  1184.     kHIDUsage_Csmr_PoliceAlarm  = 0x0108,                       /* One-Shot Control */
  1185.                                                                 /* 0x109 - 0x14F Reserved */
  1186.     kHIDUsage_Csmr_BalanceRight = 0x0150,                       /* Re-Trigger Control */
  1187.     kHIDUsage_Csmr_BalanceLeft  = 0x0151,                       /* Re-Trigger Control */
  1188.     kHIDUsage_Csmr_BassIncrement = 0x0152,                      /* Re-Trigger Control */
  1189.     kHIDUsage_Csmr_BassDecrement = 0x0153,                      /* Re-Trigger Control */
  1190.     kHIDUsage_Csmr_TrebleIncrement = 0x0154,                    /* Re-Trigger Control */
  1191.     kHIDUsage_Csmr_TrebleDecrement = 0x0155,                    /* Re-Trigger Control */
  1192.                                                                 /* 0x156 - 0x15F Reserved */
  1193.     kHIDUsage_Csmr_SpeakerSystem = 0x0160,                      /* Logical Collection */
  1194.     kHIDUsage_Csmr_ChannelLeft  = 0x0161,                       /* Logical Collection */
  1195.     kHIDUsage_Csmr_ChannelRight = 0x0162,                       /* Logical Collection */
  1196.     kHIDUsage_Csmr_ChannelCenter = 0x0163,                      /* Logical Collection */
  1197.     kHIDUsage_Csmr_ChannelFront = 0x0164,                       /* Logical Collection */
  1198.     kHIDUsage_Csmr_ChannelCenterFront = 0x0165,                 /* Logical Collection */
  1199.     kHIDUsage_Csmr_ChannelSide  = 0x0166,                       /* Logical Collection */
  1200.     kHIDUsage_Csmr_ChannelSurround = 0x0167,                    /* Logical Collection */
  1201.     kHIDUsage_Csmr_ChannelLowFrequencyEnhancement = 0x0168,     /* Logical Collection */
  1202.     kHIDUsage_Csmr_ChannelTop   = 0x0169,                       /* Logical Collection */
  1203.     kHIDUsage_Csmr_ChannelUnknown = 0x016A,                     /* Logical Collection */
  1204.                                                                 /* 0x16B - 0x16F Reserved */
  1205.     kHIDUsage_Csmr_SubChannel   = 0x0170,                       /* Linear Control */
  1206.     kHIDUsage_Csmr_SubChannelIncrement = 0x0171,                /* One-Shot Control */
  1207.     kHIDUsage_Csmr_SubChannelDecrement = 0x0172,                /* One-Shot Control */
  1208.     kHIDUsage_Csmr_AlternateAudioIncrement = 0x0173,            /* One-Shot Control */
  1209.     kHIDUsage_Csmr_AlternateAudioDecrement = 0x0174,            /* One-Shot Control */
  1210.                                                                 /* 0x175 - 0x17F Reserved */
  1211.     kHIDUsage_Csmr_ApplicationLaunchButtons = 0x0180,           /* Named Array */
  1212.     kHIDUsage_Csmr_ALLaunchButtonConfigurationTool = 0x0181,    /* Selector */
  1213.     kHIDUsage_Csmr_ALProgrammableButtonConfiguration = 0x0182,  /* Selector */
  1214.     kHIDUsage_Csmr_ALConsumerControlConfiguration = 0x0183,     /* Selector */
  1215.     kHIDUsage_Csmr_ALWordProcessor = 0x0184,                    /* Selector */
  1216.     kHIDUsage_Csmr_ALTextEditor = 0x0185,                       /* Selector */
  1217.     kHIDUsage_Csmr_ALSpreadsheet = 0x0186,                      /* Selector */
  1218.     kHIDUsage_Csmr_ALGraphicsEditor = 0x0187,                   /* Selector */
  1219.     kHIDUsage_Csmr_ALPresentationApp = 0x0188,                  /* Selector */
  1220.     kHIDUsage_Csmr_ALDatabaseApp = 0x0189,                      /* Selector */
  1221.     kHIDUsage_Csmr_ALEmailReader = 0x018A,                      /* Selector */
  1222.     kHIDUsage_Csmr_ALNewsreader = 0x018B,                       /* Selector */
  1223.     kHIDUsage_Csmr_ALVoicemail  = 0x018C,                       /* Selector */
  1224.     kHIDUsage_Csmr_ALContactsOrAddressBook = 0x018D,            /* Selector */
  1225.     kHIDUsage_Csmr_ALCalendarOrSchedule = 0x018E,               /* Selector */
  1226.     kHIDUsage_Csmr_ALTaskOrProjectManager = 0x018F,             /* Selector */
  1227.     kHIDUsage_Csmr_ALLogOrJournalOrTimecard = 0x0190,           /* Selector */
  1228.     kHIDUsage_Csmr_ALCheckbookOrFinance = 0x0191,               /* Selector */
  1229.     kHIDUsage_Csmr_ALCalculator = 0x0192,                       /* Selector */
  1230.     kHIDUsage_Csmr_ALAOrVCaptureOrPlayback = 0x0193,            /* Selector */
  1231.     kHIDUsage_Csmr_ALLocalMachineBrowser = 0x0194,              /* Selector */
  1232.     kHIDUsage_Csmr_ALLANOrWANBrowser = 0x0195,                  /* Selector */
  1233.     kHIDUsage_Csmr_ALInternetBrowser = 0x0196,                  /* Selector */
  1234.     kHIDUsage_Csmr_ALRemoteNetworkingOrISPConnect = 0x0197,     /* Selector */
  1235.     kHIDUsage_Csmr_ALNetworkConference = 0x0198,                /* Selector */
  1236.     kHIDUsage_Csmr_ALNetworkChat = 0x0199,                      /* Selector */
  1237.     kHIDUsage_Csmr_ALTelephonyOrDialer = 0x019A,                /* Selector */
  1238.     kHIDUsage_Csmr_ALLogon      = 0x019B,                       /* Selector */
  1239.     kHIDUsage_Csmr_ALLogoff     = 0x019C,                       /* Selector */
  1240.     kHIDUsage_Csmr_ALLogonOrLogoff = 0x019D,                    /* Selector */
  1241.     kHIDUsage_Csmr_ALTerminalLockOrScreensaver = 0x019E,        /* Selector */
  1242.     kHIDUsage_Csmr_ALControlPanel = 0x019F,                     /* Selector */
  1243.     kHIDUsage_Csmr_ALCommandLineProcessorOrRun = 0x01A0,        /* Selector */
  1244.     kHIDUsage_Csmr_ALProcessOrTaskManager = 0x01A1,             /* Selector */
  1245.     kHIDUsage_Csmr_AL           = 0x01A2,                       /* Selector */
  1246.     kHIDUsage_Csmr_ALNextTaskOrApplication = 0x0143,            /* Selector */
  1247.     kHIDUsage_Csmr_ALPreviousTaskOrApplication = 0x01A4,        /* Selector */
  1248.     kHIDUsage_Csmr_ALPreemptiveHaltTaskOrApplication = 0x01A5,  /* Selector */
  1249.                                                                 /* 0x1A6 - 0x1FF Reserved */
  1250.     kHIDUsage_Csmr_GenericGUIApplicationControls = 0x0200,      /* Named Array */
  1251.     kHIDUsage_Csmr_ACNew        = 0x0201,                       /* Selector */
  1252.     kHIDUsage_Csmr_ACOpen       = 0x0202,                       /* Selector */
  1253.     kHIDUsage_Csmr_ACClose      = 0x0203,                       /* Selector */
  1254.     kHIDUsage_Csmr_ACExit       = 0x0204,                       /* Selector */
  1255.     kHIDUsage_Csmr_ACMaximize   = 0x0205,                       /* Selector */
  1256.     kHIDUsage_Csmr_ACMinimize   = 0x0206,                       /* Selector */
  1257.     kHIDUsage_Csmr_ACSave       = 0x0207,                       /* Selector */
  1258.     kHIDUsage_Csmr_ACPrint      = 0x0208,                       /* Selector */
  1259.     kHIDUsage_Csmr_ACProperties = 0x0209,                       /* Selector */
  1260.     kHIDUsage_Csmr_ACUndo       = 0x021A,                       /* Selector */
  1261.     kHIDUsage_Csmr_ACCopy       = 0x021B,                       /* Selector */
  1262.     kHIDUsage_Csmr_ACCut        = 0x021C,                       /* Selector */
  1263.     kHIDUsage_Csmr_ACPaste      = 0x021D,                       /* Selector */
  1264.     kHIDUsage_Csmr_AC           = 0x021E,                       /* Selector */
  1265.     kHIDUsage_Csmr_ACFind       = 0x021F,                       /* Selector */
  1266.     kHIDUsage_Csmr_ACFindandReplace = 0x0220,                   /* Selector */
  1267.     kHIDUsage_Csmr_ACSearch     = 0x0221,                       /* Selector */
  1268.     kHIDUsage_Csmr_ACGoTo       = 0x0222,                       /* Selector */
  1269.     kHIDUsage_Csmr_ACHome       = 0x0223,                       /* Selector */
  1270.     kHIDUsage_Csmr_ACBack       = 0x0224,                       /* Selector */
  1271.     kHIDUsage_Csmr_ACForward    = 0x0225,                       /* Selector */
  1272.     kHIDUsage_Csmr_ACStop       = 0x0226,                       /* Selector */
  1273.     kHIDUsage_Csmr_ACRefresh    = 0x0227,                       /* Selector */
  1274.     kHIDUsage_Csmr_ACPreviousLink = 0x0228,                     /* Selector */
  1275.     kHIDUsage_Csmr_ACNextLink   = 0x0229,                       /* Selector */
  1276.     kHIDUsage_Csmr_ACBookmarks  = 0x022A,                       /* Selector */
  1277.     kHIDUsage_Csmr_ACHistory    = 0x022B,                       /* Selector */
  1278.     kHIDUsage_Csmr_ACSubscriptions = 0x022C,                    /* Selector */
  1279.     kHIDUsage_Csmr_ACZoomIn     = 0x022D,                       /* Selector */
  1280.     kHIDUsage_Csmr_ACZoomOut    = 0x022E,                       /* Selector */
  1281.     kHIDUsage_Csmr_ACZoom       = 0x022F,                       /* Selector */
  1282.     kHIDUsage_Csmr_ACFullScreenView = 0x0230,                   /* Selector */
  1283.     kHIDUsage_Csmr_ACNormalView = 0x0231,                       /* Selector */
  1284.     kHIDUsage_Csmr_ACViewToggle = 0x0232,                       /* Selector */
  1285.     kHIDUsage_Csmr_ACScrollUp   = 0x0233,                       /* Selector */
  1286.     kHIDUsage_Csmr_ACScrollDown = 0x0234,                       /* Selector */
  1287.     kHIDUsage_Csmr_ACScroll     = 0x0235,                       /* Selector */
  1288.     kHIDUsage_Csmr_ACPanLeft    = 0x0236,                       /* Selector */
  1289.     kHIDUsage_Csmr_ACPanRight   = 0x0237,                       /* Selector */
  1290.     kHIDUsage_Csmr_ACPan        = 0x0238,                       /* Selector */
  1291.     kHIDUsage_Csmr_ACNewWindow  = 0x0239,                       /* Selector */
  1292.     kHIDUsage_Csmr_ACTileHorizontally = 0x023A,                 /* Selector */
  1293.     kHIDUsage_Csmr_ACTileVertically = 0x023B,                   /* Selector */
  1294.     kHIDUsage_Csmr_ACFormat     = 0x023C,                       /* Selector */
  1295.                                                                 /* 0x23D - 0xFFFF Reserved */
  1296.     kHIDUsage_Csmr_Reserved     = 0xFFFF
  1297. };
  1298. /* Digitizer Page (0x0D) */
  1299. /* This section provides detailed descriptions of the usages employed by Digitizer Devices. */
  1300. enum {
  1301.     kHIDUsage_Dig_Digitizer     = 0x01,                         /* Application Collection */
  1302.     kHIDUsage_Dig_Pen           = 0x02,                         /* Application Collection */
  1303.     kHIDUsage_Dig_LightPen      = 0x03,                         /* Application Collection */
  1304.     kHIDUsage_Dig_TouchScreen   = 0x04,                         /* Application Collection */
  1305.     kHIDUsage_Dig_TouchPad      = 0x05,                         /* Application Collection */
  1306.     kHIDUsage_Dig_WhiteBoard    = 0x06,                         /* Application Collection */
  1307.     kHIDUsage_Dig_CoordinateMeasuringMachine = 0x07,            /* Application Collection */
  1308.     kHIDUsage_Dig_3DDigitizer   = 0x08,                         /* Application Collection */
  1309.     kHIDUsage_Dig_StereoPlotter = 0x09,                         /* Application Collection */
  1310.     kHIDUsage_Dig_ArticulatedArm = 0x0A,                        /* Application Collection */
  1311.     kHIDUsage_Dig_Armature      = 0x0B,                         /* Application Collection */
  1312.     kHIDUsage_Dig_MultiplePointDigitizer = 0x0C,                /* Application Collection */
  1313.     kHIDUsage_Dig_FreeSpaceWand = 0x0D,                         /* Application Collection */
  1314.                                                                 /* 0x0E - 0x1F Reserved */
  1315.     kHIDUsage_Dig_Stylus        = 0x20,                         /* Logical Collection */
  1316.     kHIDUsage_Dig_Puck          = 0x21,                         /* Logical Collection */
  1317.     kHIDUsage_Dig_Finger        = 0x22,                         /* Logical Collection */
  1318.                                                                 /* 0x23 - 0x2F Reserved */
  1319.     kHIDUsage_Dig_TipPressure   = 0x30,                         /* Dynamic Value */
  1320.     kHIDUsage_Dig_BarrelPressure = 0x31,                        /* Dynamic Value */
  1321.     kHIDUsage_Dig_InRange       = 0x32,                         /* Momentary Control */
  1322.     kHIDUsage_Dig_Touch         = 0x33,                         /* Momentary Control */
  1323.     kHIDUsage_Dig_Untouch       = 0x34,                         /* One-Shot Control */
  1324.     kHIDUsage_Dig_Tap           = 0x35,                         /* One-Shot Control */
  1325.     kHIDUsage_Dig_Quality       = 0x36,                         /* Dynamic Value */
  1326.     kHIDUsage_Dig_DataValid     = 0x37,                         /* Momentary Control */
  1327.     kHIDUsage_Dig_TransducerIndex = 0x38,                       /* Dynamic Value */
  1328.     kHIDUsage_Dig_TabletFunctionKeys = 0x39,                    /* Logical Collection */
  1329.     kHIDUsage_Dig_ProgramChangeKeys = 0x3A,                     /* Logical Collection */
  1330.     kHIDUsage_Dig_BatteryStrength = 0x3B,                       /* Dynamic Value */
  1331.     kHIDUsage_Dig_Invert        = 0x3C,                         /* Momentary Control */
  1332.     kHIDUsage_Dig_XTilt         = 0x3D,                         /* Dynamic Value */
  1333.     kHIDUsage_Dig_YTilt         = 0x3E,                         /* Dynamic Value */
  1334.     kHIDUsage_Dig_Azimuth       = 0x3F,                         /* Dynamic Value */
  1335.     kHIDUsage_Dig_Altitude      = 0x40,                         /* Dynamic Value */
  1336.     kHIDUsage_Dig_Twist         = 0x41,                         /* Dynamic Value */
  1337.     kHIDUsage_Dig_TipSwitch     = 0x42,                         /* Momentary Control */
  1338.     kHIDUsage_Dig_SecondaryTipSwitch = 0x43,                    /* Momentary Control */
  1339.     kHIDUsage_Dig_BarrelSwitch  = 0x44,                         /* Momentary Control */
  1340.     kHIDUsage_Dig_Eraser        = 0x45,                         /* Momentary Control */
  1341.     kHIDUsage_Dig_TabletPick    = 0x46,                         /* Momentary Control */
  1342.                                                                 /* 0x47 - 0xFFFF Reserved */
  1343.     kHIDUsage_Dig_Reserved      = 0xFFFF
  1344. };
  1345. /* AlphanumericDisplay Page (0x14) */
  1346. /* The Alphanumeric Display page is intended for use by simple alphanumeric displays that are used on consumer devices. */
  1347. enum {
  1348.     kHIDUsage_AD_AlphanumericDisplay = 0x01,                    /* Application Collection */
  1349.                                                                 /* 0x02 - 0x1F Reserved */
  1350.     kHIDUsage_AD_DisplayAttributesReport = 0x20,                /* Logical Collection */
  1351.     kHIDUsage_AD_ASCIICharacterSet = 0x21,                      /* Static Flag */
  1352.     kHIDUsage_AD_DataReadBack   = 0x22,                         /* Static Flag */
  1353.     kHIDUsage_AD_FontReadBack   = 0x23,                         /* Static Flag */
  1354.     kHIDUsage_AD_DisplayControlReport = 0x24,                   /* Logical Collection */
  1355.     kHIDUsage_AD_ClearDisplay   = 0x25,                         /* Dynamic Flag */
  1356.     kHIDUsage_AD_DisplayEnable  = 0x26,                         /* Dynamic Flag */
  1357.     kHIDUsage_AD_ScreenSaverDelay = 0x27,                       /* Static Value */
  1358.     kHIDUsage_AD_ScreenSaverEnable = 0x28,                      /* Dynamic Flag */
  1359.     kHIDUsage_AD_VerticalScroll = 0x29,                         /* Static Flag */
  1360.     kHIDUsage_AD_HorizontalScroll = 0x2A,                       /* Static Flag */
  1361.     kHIDUsage_AD_CharacterReport = 0x2B,                        /* Logical Collection */
  1362.     kHIDUsage_AD_DisplayData    = 0x2C,                         /* Dynamic Value */
  1363.     kHIDUsage_AD_DisplayStatus  = 0x2D,                         /* Logical Collection */
  1364.     kHIDUsage_AD_StatNotReady   = 0x2E,                         /* Selector */
  1365.     kHIDUsage_AD_StatReady      = 0x2F,                         /* Selector */
  1366.     kHIDUsage_AD_ErrNotaloadablecharacter = 0x30,               /* Selector */
  1367.     kHIDUsage_AD_ErrFontdatacannotberead = 0x31,                /* Selector */
  1368.     kHIDUsage_AD_CursorPositionReport = 0x32,                   /* Logical Collection */
  1369.     kHIDUsage_AD_Row            = 0x33,                         /* Dynamic Value */
  1370.     kHIDUsage_AD_Column         = 0x34,                         /* Dynamic Value */
  1371.     kHIDUsage_AD_Rows           = 0x35,                         /* Static Value */
  1372.     kHIDUsage_AD_Columns        = 0x36,                         /* Static Value */
  1373.     kHIDUsage_AD_CursorPixelPositioning = 0x37,                 /* Static Flag */
  1374.     kHIDUsage_AD_CursorMode     = 0x38,                         /* Dynamic Flag */
  1375.     kHIDUsage_AD_CursorEnable   = 0x39,                         /* Dynamic Flag */
  1376.     kHIDUsage_AD_CursorBlink    = 0x3A,                         /* Dynamic Flag */
  1377.     kHIDUsage_AD_FontReport     = 0x3B,                         /* Logical Collection */
  1378.     kHIDUsage_AD_FontData       = 0x3C,                         /* Buffered Byte */
  1379.     kHIDUsage_AD_CharacterWidth = 0x3D,                         /* Static Value */
  1380.     kHIDUsage_AD_CharacterHeight = 0x3E,                        /* Static Value */
  1381.     kHIDUsage_AD_CharacterSpacingHorizontal = 0x3F,             /* Static Value */
  1382.     kHIDUsage_AD_CharacterSpacingVertical = 0x40,               /* Static Value */
  1383.     kHIDUsage_AD_UnicodeCharacterSet = 0x41,                    /* Static Flag */
  1384.                                                                 /* 0x42 - 0xFFFF Reserved */
  1385.     kHIDUsage_AD_Reserved       = 0xFFFF
  1386. };
  1387. #if PRAGMA_STRUCT_ALIGN
  1388.     #pragma options align=reset
  1389. #elif PRAGMA_STRUCT_PACKPUSH
  1390.     #pragma pack(pop)
  1391. #elif PRAGMA_STRUCT_PACK
  1392.     #pragma pack()
  1393. #endif
  1394. #ifdef PRAGMA_IMPORT_OFF
  1395. #pragma import off
  1396. #elif PRAGMA_IMPORT
  1397. #pragma import reset
  1398. #endif
  1399. #ifdef __cplusplus
  1400. }
  1401. #endif
  1402. #endif /* __HID__ */