Mac OS 9
HID.h
Go to the documentation of this file.
1 
19 #ifndef __HID__
20 #define __HID__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __MACERRORS__
27 #include <MacErrors.h>
28 #endif
29 
30 #if PRAGMA_ONCE
31 #pragma once
32 #endif
33 
34 #ifdef __cplusplus
35 extern "C"
36 {
37 #endif
38 
39 #if PRAGMA_IMPORT
40 #pragma import on
41 #endif
42 
43 #if PRAGMA_STRUCT_ALIGN
44 #pragma options align = mac68k
45 #elif PRAGMA_STRUCT_PACKPUSH
46 #pragma pack(push, 2)
47 #elif PRAGMA_STRUCT_PACK
48 #pragma pack(2)
49 #endif
50 
56  /* types of HID reports (input, output, feature)*/
57  enum
58  {
59  kHIDInputReport = 1,
60  kHIDOutputReport = 2,
61  kHIDFeatureReport = 3,
62  kHIDUnknownReport = 255
63  };
64 
65  /* constants used in HIDButtonCapabilities and HIDValueCapabilities structures*/
66  enum
67  {
68  /* While HIDButtonCaps and HIDValueCaps have no version #, they can be*/
69  /* thought of as version 1 of HIDButtonCapabilities and
70  HIDValueCapabilities.*/
71  kHIDCurrentCapabilitiesPBVersion = 2
72  };
73 
74  /* flags passed to HIDOpenReportDescriptor*/
75  enum
76  {
77  kHIDFlag_StrictErrorChecking = 0x00000001
78  };
79 
80  typedef UInt32 HIDReportType;
81  typedef UInt32 HIDUsage;
82  typedef struct OpaqueHIDPreparsedDataRef *HIDPreparsedDataRef;
84  {
85  HIDUsage usage;
86  HIDUsage usagePage;
87  };
88  typedef struct HIDUsageAndPage HIDUsageAndPage;
90  struct HIDCaps
91  {
92  HIDUsage usage;
93  HIDUsage usagePage;
94  ByteCount inputReportByteLength;
95  ByteCount outputReportByteLength;
96  ByteCount featureReportByteLength;
97  UInt32 numberCollectionNodes;
98  UInt32 numberInputButtonCaps;
99  UInt32 numberInputValueCaps;
100  UInt32 numberOutputButtonCaps;
101  UInt32 numberOutputValueCaps;
102  UInt32 numberFeatureButtonCaps;
103  UInt32 numberFeatureValueCaps;
104  };
105  typedef struct HIDCaps HIDCaps;
106  typedef HIDCaps *HIDCapsPtr;
108  {
109  HIDUsage usage;
110  HIDUsage usagePage;
111  ByteCount inputReportByteLength;
112  ByteCount outputReportByteLength;
113  ByteCount featureReportByteLength;
114  UInt32 numberCollectionNodes;
115  UInt32 numberInputButtonCaps;
116  UInt32 numberInputValueCaps;
117  UInt32 numberOutputButtonCaps;
118  UInt32 numberOutputValueCaps;
119  UInt32 numberFeatureButtonCaps;
120  UInt32 numberFeatureValueCaps;
121  };
122  typedef struct HIDCapabilities HIDCapabilities;
125  {
126  HIDUsage collectionUsage;
127  HIDUsage collectionUsagePage;
128  UInt32 parent;
129  UInt32 numberOfChildren;
130  UInt32 nextSibling;
131  UInt32 firstChild;
132  };
133  typedef struct HIDCollectionNode HIDCollectionNode;
136  {
137  HIDUsage usagePage;
138  UInt32 reportID;
139  UInt32 bitField;
140  UInt32 collection;
141  HIDUsage collectionUsage;
142  HIDUsage collectionUsagePage;
143  Boolean isRange;
144  Boolean isStringRange;
145  Boolean isDesignatorRange;
146  Boolean isAbsolute;
147 
148  union
149  {
150  struct
151  {
152  HIDUsage usageMin;
153  HIDUsage usageMax;
154  UInt32 stringMin;
155  UInt32 stringMax;
156  UInt32 designatorMin;
157  UInt32 designatorMax;
158  } range;
159  struct
160  {
161  HIDUsage usage;
162  HIDUsage reserved1;
163  UInt32 stringIndex;
164  UInt32 reserved2;
165  UInt32 designatorIndex;
166  UInt32 reserved3;
167  } notRange;
168  } u;
169  };
170  typedef struct HIDButtonCaps HIDButtonCaps;
173  {
174  HIDUsage usagePage;
175  UInt32 reportID;
176  UInt32 bitField;
177  UInt32 collection;
178  HIDUsage collectionUsage;
179  HIDUsage collectionUsagePage;
180 
181  Boolean isRange;
182  Boolean isStringRange;
183  Boolean isDesignatorRange;
184  Boolean isAbsolute;
185 
186  SInt32 unitExponent;
187  SInt32 units;
188  UInt32 reserved;
189  UInt32 pbVersion;
190 
191  union
192  {
193  struct
194  {
195  HIDUsage usageMin;
196  HIDUsage usageMax;
197  UInt32 stringMin;
198  UInt32 stringMax;
199  UInt32 designatorMin;
200  UInt32 designatorMax;
201  } range;
202  struct
203  {
204  HIDUsage usage;
205  HIDUsage reserved1;
206  UInt32 stringIndex;
207  UInt32 reserved2;
208  UInt32 designatorIndex;
209  UInt32 reserved3;
210  } notRange;
211  } u;
212  };
216  {
217  HIDUsage usagePage;
218  UInt32 reportID;
219  UInt32 bitField;
220  UInt32 collection;
221  HIDUsage collectionUsage;
222  HIDUsage collectionUsagePage;
223 
224  Boolean isRange;
225  Boolean isStringRange;
226  Boolean isDesignatorRange;
227  Boolean isAbsolute;
228 
229  UInt32 bitSize;
230  UInt32 reportCount;
231 
232  SInt32 logicalMin;
233  SInt32 logicalMax;
234  SInt32 physicalMin;
235  SInt32 physicalMax;
236 
237  union
238  {
239  struct
240  {
241  HIDUsage usageMin;
242  HIDUsage usageMax;
243  UInt32 stringMin;
244  UInt32 stringMax;
245  UInt32 designatorMin;
246  UInt32 designatorMax;
247  } range;
248  struct
249  {
250  HIDUsage usage;
251  HIDUsage reserved1;
252  UInt32 stringIndex;
253  UInt32 reserved2;
254  UInt32 designatorIndex;
255  UInt32 reserved3;
256  } notRange;
257  } u;
258  };
259  typedef struct HIDValueCaps HIDValueCaps;
260  typedef HIDValueCaps *HIDValueCapsPtr;
262  {
263  HIDUsage usagePage;
264  UInt32 reportID;
265  UInt32 bitField;
266  UInt32 collection;
267  HIDUsage collectionUsage;
268  HIDUsage collectionUsagePage;
269 
270  Boolean isRange;
271  Boolean isStringRange;
272  Boolean isDesignatorRange;
273  Boolean isAbsolute;
274 
275  UInt32 bitSize;
276  UInt32 reportCount;
277 
278  SInt32 logicalMin;
279  SInt32 logicalMax;
280  SInt32 physicalMin;
281  SInt32 physicalMax;
282 
283  SInt32 unitExponent;
284  SInt32 units;
285  UInt32 reserved;
286  UInt32 pbVersion;
287 
288  union
289  {
290  struct
291  {
292  HIDUsage usageMin;
293  HIDUsage usageMax;
294  UInt32 stringMin;
295  UInt32 stringMax;
296  UInt32 designatorMin;
297  UInt32 designatorMax;
298  } range;
299  struct
300  {
301  HIDUsage usage;
302  HIDUsage reserved1;
303  UInt32 stringIndex;
304  UInt32 reserved2;
305  UInt32 designatorIndex;
306  UInt32 reserved3;
307  } notRange;
308  } u;
309  };
312 #if CALL_NOT_IN_CARBON
321  UInt32
323 
332  OSStatus
333  HIDOpenReportDescriptor(void *hidReportDescriptor, ByteCount descriptorLength,
334  HIDPreparsedDataRef *preparsedDataRef, UInt32 flags);
335 
344  OSStatus
345  HIDCloseReportDescriptor(HIDPreparsedDataRef preparsedDataRef);
346 
355  OSStatus
356  HIDGetCaps(HIDPreparsedDataRef preparsedDataRef, HIDCapsPtr capabilities);
357 
366  OSStatus
367  HIDGetCapabilities(HIDPreparsedDataRef preparsedDataRef,
368  HIDCapabilitiesPtr capabilities);
369 
378  OSStatus
380  UInt32 *collectionNodesSize,
381  HIDPreparsedDataRef preparsedDataRef);
382 
391  OSStatus
392  HIDGetButtonCaps(HIDReportType reportType, HIDButtonCapsPtr buttonCaps,
393  UInt32 *buttonCapsSize, HIDPreparsedDataRef preparsedDataRef);
394 
403  OSStatus
404  HIDGetButtonCapabilities(HIDReportType reportType,
405  HIDButtonCapabilitiesPtr buttonCaps,
406  UInt32 *buttonCapsSize,
407  HIDPreparsedDataRef preparsedDataRef);
408 
417  OSStatus
418  HIDGetValueCaps(HIDReportType reportType, HIDValueCapsPtr valueCaps,
419  UInt32 *valueCapsSize, HIDPreparsedDataRef preparsedDataRef);
420 
429  OSStatus
430  HIDGetValueCapabilities(HIDReportType reportType,
431  HIDValueCapabilitiesPtr valueCaps,
432  UInt32 *valueCapsSize,
433  HIDPreparsedDataRef preparsedDataRef);
434 
443  OSStatus
444  HIDGetSpecificButtonCaps(HIDReportType reportType, HIDUsage usagePage,
445  UInt32 collection, HIDUsage usage,
446  HIDButtonCapsPtr buttonCaps, UInt32 *buttonCapsSize,
447  HIDPreparsedDataRef preparsedDataRef);
448 
457  OSStatus
458  HIDGetSpecificButtonCapabilities(HIDReportType reportType, HIDUsage usagePage,
459  UInt32 collection, HIDUsage usage,
460  HIDButtonCapabilitiesPtr buttonCaps,
461  UInt32 *buttonCapsSize,
462  HIDPreparsedDataRef preparsedDataRef);
463 
472  OSStatus
473  HIDGetSpecificValueCaps(HIDReportType reportType, HIDUsage usagePage,
474  UInt32 collection, HIDUsage usage,
475  HIDValueCapsPtr valueCaps, UInt32 *valueCapsSize,
476  HIDPreparsedDataRef preparsedDataRef);
477 
486  OSStatus
487  HIDGetSpecificValueCapabilities(HIDReportType reportType, HIDUsage usagePage,
488  UInt32 collection, HIDUsage usage,
489  HIDValueCapabilitiesPtr valueCaps,
490  UInt32 *valueCapsSize,
491  HIDPreparsedDataRef preparsedDataRef);
492 
501  OSStatus
502  HIDGetNextButtonInfo(HIDReportType reportType, HIDUsage usagePage,
503  HIDUsage usage, UInt32 *collection, UInt8 *reportID,
504  HIDPreparsedDataRef preparsedDataRef);
505 
514  OSStatus
515  HIDGetNextUsageValueInfo(HIDReportType reportType, HIDUsage usagePage,
516  HIDUsage usage, UInt32 *collection, UInt8 *reportID,
517  HIDPreparsedDataRef preparsedDataRef);
518 
527  UInt32
528  HIDMaxUsageListLength(HIDReportType reportType, HIDUsage usagePage,
529  HIDPreparsedDataRef preparsedDataRef);
530 
539  OSStatus
540  HIDGetReportLength(HIDReportType reportType, UInt8 reportID,
541  ByteCount *reportLength,
542  HIDPreparsedDataRef preparsedDataRef);
543 
552  OSStatus
553  HIDInitReport(HIDReportType reportType, UInt8 reportID,
554  HIDPreparsedDataRef preparsedDataRef, void *report,
555  ByteCount reportLength);
556 
565  OSStatus
566  HIDGetButtons(HIDReportType reportType, UInt32 collection,
567  HIDUsageAndPagePtr usageList, UInt32 *usageListSize,
568  HIDPreparsedDataRef preparsedDataRef, void *report,
569  ByteCount reportLength);
570 
579  OSStatus
580  HIDGetButtonsOnPage(HIDReportType reportType, HIDUsage usagePage,
581  UInt32 collection, HIDUsage *usageList,
582  UInt32 *usageListSize, HIDPreparsedDataRef preparsedDataRef,
583  void *report, ByteCount reportLength);
584 
593  OSStatus
594  HIDGetScaledUsageValue(HIDReportType reportType, HIDUsage usagePage,
595  UInt32 collection, HIDUsage usage, SInt32 *usageValue,
596  HIDPreparsedDataRef preparsedDataRef, void *report,
597  ByteCount reportLength);
598 
607  OSStatus
608  HIDGetUsageValue(HIDReportType reportType, HIDUsage usagePage,
609  UInt32 collection, HIDUsage usage, SInt32 *usageValue,
610  HIDPreparsedDataRef preparsedDataRef, void *report,
611  ByteCount reportLength);
612 
621  OSStatus
622  HIDGetUsageValueArray(HIDReportType reportType, HIDUsage usagePage,
623  UInt32 collection, HIDUsage usage, Byte *usageValueBuffer,
624  ByteCount usageValueBufferSize,
625  HIDPreparsedDataRef preparsedDataRef, void *report,
626  ByteCount reportLength);
627 
636  OSStatus
637  HIDSetButton(HIDReportType reportType, HIDUsage usagePage, UInt32 collection,
638  HIDUsage usage, HIDPreparsedDataRef preparsedDataRef, void *report,
639  ByteCount reportLength);
640 
649  OSStatus
650  HIDSetButtons(HIDReportType reportType, HIDUsage usagePage, UInt32 collection,
651  HIDUsage *usageList, UInt32 *usageListSize,
652  HIDPreparsedDataRef preparsedDataRef, void *report,
653  ByteCount reportLength);
654 
663  OSStatus
664  HIDSetScaledUsageValue(HIDReportType reportType, HIDUsage usagePage,
665  UInt32 collection, HIDUsage usage, SInt32 usageValue,
666  HIDPreparsedDataRef preparsedDataRef, void *report,
667  ByteCount reportLength);
668 
677  OSStatus
678  HIDSetUsageValue(HIDReportType reportType, HIDUsage usagePage,
679  UInt32 collection, HIDUsage usage, SInt32 usageValue,
680  HIDPreparsedDataRef preparsedDataRef, void *report,
681  ByteCount reportLength);
682 
691  OSStatus
692  HIDSetUsageValueArray(HIDReportType reportType, HIDUsage usagePage,
693  UInt32 collection, HIDUsage usage, Byte *usageValueBuffer,
694  ByteCount usageValueBufferLength,
695  HIDPreparsedDataRef preparsedDataRef, void *report,
696  ByteCount reportLength);
697 
706  OSStatus
707  HIDUsageListDifference(HIDUsage *previousUsageList, HIDUsage *currentUsageList,
708  HIDUsage *breakUsageList, HIDUsage *makeUsageList,
709  UInt32 usageListsSize);
710 
716 /* these are the constants to be passed to HIDGetDeviceInfo*/
717 #endif /* CALL_NOT_IN_CARBON */
718 
719  enum
720  {
721  kHIDGetInfo_VendorID = 1,
722  kHIDGetInfo_ProductID = 2,
723  kHIDGetInfo_VersionNumber = 3,
724  kHIDGetInfo_InterfaceRef = 4,
725  kHIDGetInfo_MaxReportSize = 0x10,
726  kHIDGetInfo_GetManufacturerString = 0x0100,
727  kHIDGetInfo_GetProductString = 0x0101,
728  kHIDGetInfo_GetSerialNumberString = 0x0102,
729  kHIDGetInfo_VendorSpecificStart = 0x00010000
730  };
731 
732  /* these are the valid permissions to pass to HIDOpenDevice*/
733  enum
734  {
735  kHIDPerm_ReadOnly = 0x0001,
736  kHIDPerm_ReadWriteShared = 0x0003,
737  kHIDPerm_ReadWriteExclusive = 0x0013
738  };
739 
740  /* these are flags used in HIDInstallReportHandler*/
741  enum
742  {
743  kHIDFlag_CallbackIsResident = 0x0001
744  };
745 
746  /* these are the constants to be passed to HIDControlDevice*/
747  enum
748  {
749  kHIDVendorSpecificControlStart = 0x00010000
750  };
751 
752  /* these constant versions are used in the HIDDeviceDispatchTable structure*/
753  enum
754  {
755  kHIDCurrentDispatchTableVersion = 3,
756  kHIDOldestCompatableDispatchTableVersion = 1,
757  kHIDDispatchTableVersion1 = 1,
758  kHIDDispatchTableVersion2 = 2,
759  kHIDDispatchTableVersion1OldestCompatible = 1
760  };
761 
762  typedef struct OpaqueHIDDeviceConnectionRef *HIDDeviceConnectionRef;
763  /* HIDGetDeviceInfo is used to get specific information about a HID Device*/
764  typedef CALLBACK_API_C(OSStatus, HIDGetDeviceInfoProcPtr)(UInt32 inInfoSelector,
765  void *outInfo,
766  ByteCount *ioSize);
767  /* HIDGetHIDDescriptor is used to get a specific HID descriptor from a HID
768  * device (such as a report descriptor)*/
769  typedef CALLBACK_API_C(OSStatus,
770  HIDGetHIDDescriptorProcPtr)(UInt32 inDescriptorType,
771  UInt32 inDescriptorIndex,
772  void *outDescriptor,
773  UInt32 *ioBufferSize);
774  /* You must first 'open' a device before using it*/
775  typedef CALLBACK_API_C(OSStatus, HIDOpenDeviceProcPtr)(
776  HIDDeviceConnectionRef *outConnectionRef, UInt32 permissions,
777  UInt32 reserved);
778  /* When finished, 'close' a device*/
779  typedef CALLBACK_API_C(OSStatus, HIDCloseDeviceProcPtr)(
780  HIDDeviceConnectionRef inConnectionRef);
781  /* User provided ProcPtr to be called when HID report is received*/
782  typedef CALLBACK_API_C(void, HIDReportHandlerProcPtr)(void *inHIDReport,
783  UInt32 inHIDReportLength,
784  UInt32 inRefcon);
785  /* User provided ProcPtr to be called when indexed string is received*/
786  typedef CALLBACK_API_C(void, HIDStringHandlerProcPtr)(void *inHIDReport,
787  UInt32 inHIDReportLength,
788  UInt32 inRefcon,
789  OSStatus inStatus);
796  typedef CALLBACK_API_C(OSStatus, HIDInstallReportHandlerProcPtr)(
797  HIDDeviceConnectionRef inConnectionRef, UInt32 flags,
798  HIDReportHandlerProcPtr inReportHandlerProc, UInt32 inRefcon);
799  /* When finished, remove the report handler.*/
800  typedef CALLBACK_API_C(OSStatus, HIDRemoveReportHandlerProcPtr)(
801  HIDDeviceConnectionRef inConnectionRef);
802  /* If there was a HIDReportHandler installed previous to the one from this
803  * connection, pass that one this report*/
804  typedef CALLBACK_API_C(OSStatus, HIDCallPreviousReportHandlerProcPtr)(
805  HIDDeviceConnectionRef inConnectionRef, void *inHIDReport,
806  UInt32 inHIDReportLength);
812  typedef CALLBACK_API_C(OSStatus, HIDGetReportProcPtr)(
813  HIDDeviceConnectionRef inConnectionRef, UInt32 inReportType,
814  UInt32 inReportID, HIDReportHandlerProcPtr inReportHandlerProc,
815  UInt32 inRefcon);
816  /* HIDGetSizedReport is used like HIDGetReport, but for devices that require
817  * exact size to return report.*/
818  typedef CALLBACK_API_C(OSStatus, HIDGetSizedReportProcPtr)(
819  HIDDeviceConnectionRef inConnectionRef, UInt32 inReportType,
820  UInt32 inReportID, ByteCount inSize,
821  HIDReportHandlerProcPtr inReportHandlerProc, UInt32 inRefcon);
822  /* HIDSetReport is used to send a report (of type input, output, or feature)
823  * directly to a HID device*/
824  typedef CALLBACK_API_C(OSStatus, HIDSetReportProcPtr)(
825  HIDDeviceConnectionRef inConnectionRef, UInt32 inReportType,
826  UInt32 inReportID, void *inInfo, ByteCount inSize);
827  /* HIDControlDevice is used to send misc control messages to a device*/
828  typedef CALLBACK_API_C(OSStatus, HIDControlDeviceProcPtr)(
829  HIDDeviceConnectionRef inConnectionRef, UInt32 inControlSelector,
830  void *ioControlData);
836  typedef CALLBACK_API_C(OSStatus, HIDGetIndexedStringProcPtr)(
837  HIDDeviceConnectionRef inConnectionRef, UInt32 inStringIndex,
838  UInt32 inStringLanguage, HIDStringHandlerProcPtr inStringHandlerProc,
839  UInt32 inRefcon);
848  {
849  UInt32 dispatchTableCurrentVersion;
850  UInt32 dispatchTableOldestVersion;
851  UInt32 vendorID;
852  UInt32 vendorSpecific;
853  UInt32 reserved;
854 
855  HIDGetDeviceInfoProcPtr pHIDGetDeviceInfo;
856  HIDGetHIDDescriptorProcPtr pHIDGetHIDDescriptor;
857  HIDOpenDeviceProcPtr pHIDOpenDevice;
858  HIDCloseDeviceProcPtr pHIDCloseDevice;
859  HIDInstallReportHandlerProcPtr pHIDInstallReportHandler;
860  HIDRemoveReportHandlerProcPtr pHIDRemoveReportHandler;
861  HIDCallPreviousReportHandlerProcPtr pHIDCallPreviousReportHandler;
862  HIDGetReportProcPtr
863  pHIDGetReport; /* new for vers 2, was reserved in version 1*/
864  HIDSetReportProcPtr
865  pHIDSetReport; /* new for vers 2, was reserved in version 1*/
866  HIDControlDeviceProcPtr pHIDControlDevice;
867  HIDGetIndexedStringProcPtr pHIDGetIndexedString; /* new for vers 3*/
868  HIDGetSizedReportProcPtr pHIDGetSizedReport; /* new for vers 3*/
869  };
872  /* A USB HIDDevice driver should export a HIDDeviceDispatchTable symbol */
873  /* in it's PEF container, with the name "\pTheHIDDeviceDispatchTable" */
874 
875  /* ******************************************************************************************
876  */
877  /* HID Usage Tables */
878  /* */
879  /* The following constants are from the USB 'HID Usage Tables' specification,
880  * revision 1.1rc3 */
881  /* ******************************************************************************************
882  */
883 
884  /* Usage Pages */
885  enum
886  {
887  kHIDPage_Undefined = 0x00,
888  kHIDPage_GenericDesktop = 0x01,
889  kHIDPage_Simulation = 0x02,
890  kHIDPage_VR = 0x03,
891  kHIDPage_Sport = 0x04,
892  kHIDPage_Game = 0x05, /* Reserved 0x06 */
893  kHIDPage_KeyboardOrKeypad =
894  0x07, /* USB Device Class Definition for Human Interface Devices (HID).
895  Note: the usage type for all key codes is Selector (Sel). */
896  kHIDPage_LEDs = 0x08,
897  kHIDPage_Button = 0x09,
898  kHIDPage_Ordinal = 0x0A,
899  kHIDPage_Telephony = 0x0B,
900  kHIDPage_Consumer = 0x0C,
901  kHIDPage_Digitizer = 0x0D, /* Reserved 0x0E */
902  kHIDPage_PID = 0x0F, /* USB Physical Interface Device definitions for force
903  feedback and related devices. */
904  kHIDPage_Unicode = 0x10, /* Reserved 0x11 - 0x13 */
905  kHIDPage_AlphanumericDisplay = 0x14, /* Reserved 0x15 - 0x7F */
906  /* Monitor 0x80 - 0x83 USB Device Class Definition for Monitor Devices */
907  /* Power 0x84 - 0x87 USB Device Class Definition for Power Devices */
908  /* Reserved 0x88 - 0x8B */
909  kHIDPage_BarCodeScanner = 0x8C, /* (Point of Sale) USB Device Class Definition
910  for Bar Code Scanner Devices */
911  kHIDPage_Scale =
912  0x8D, /* (Point of Sale) USB Device Class Definition for Scale Devices */
913  /* ReservedPointofSalepages 0x8E - 0x8F */
914  kHIDPage_CameraControl =
915  0x90, /* USB Device Class Definition for Image Class Devices */
916  kHIDPage_Arcade =
917  0x91, /* OAAF Definitions for arcade and coinop related Devices */
918  /* Reserved 0x92 - 0xFEFF */
919  /* VendorDefined 0xFF00 - 0xFFFF */
920  kHIDPage_VendorDefinedStart = 0xFF00
921  };
922 
923  /* Undefined Usage for all usage pages */
924  enum
925  {
926  kHIDUsage_Undefined = 0x00
927  };
928 
929  /* GenericDesktop Page (0x01) */
930  enum
931  {
932  kHIDUsage_GD_Pointer = 0x01, /* Physical Collection */
933  kHIDUsage_GD_Mouse = 0x02, /* Application Collection */
934  /* 0x03 Reserved */
935  kHIDUsage_GD_Joystick = 0x04, /* Application Collection */
936  kHIDUsage_GD_GamePad = 0x05, /* Application Collection */
937  kHIDUsage_GD_Keyboard = 0x06, /* Application Collection */
938  kHIDUsage_GD_Keypad = 0x07, /* Application Collection */
939  kHIDUsage_GD_MultiAxisController = 0x08, /* Application Collection */
940  /* 0x09 - 0x2F Reserved */
941  kHIDUsage_GD_X = 0x30, /* Dynamic Value */
942  kHIDUsage_GD_Y = 0x31, /* Dynamic Value */
943  kHIDUsage_GD_Z = 0x32, /* Dynamic Value */
944  kHIDUsage_GD_Rx = 0x33, /* Dynamic Value */
945  kHIDUsage_GD_Ry = 0x34, /* Dynamic Value */
946  kHIDUsage_GD_Rz = 0x35, /* Dynamic Value */
947  kHIDUsage_GD_Slider = 0x36, /* Dynamic Value */
948  kHIDUsage_GD_Dial = 0x37, /* Dynamic Value */
949  kHIDUsage_GD_Wheel = 0x38, /* Dynamic Value */
950  kHIDUsage_GD_Hatswitch = 0x39, /* Dynamic Value */
951  kHIDUsage_GD_CountedBuffer = 0x3A, /* Logical Collection */
952  kHIDUsage_GD_ByteCount = 0x3B, /* Dynamic Value */
953  kHIDUsage_GD_MotionWakeup = 0x3C, /* One-Shot Control */
954  kHIDUsage_GD_Start = 0x3D, /* On/Off Control */
955  kHIDUsage_GD_Select = 0x3E, /* On/Off Control */
956  /* 0x3F Reserved */
957  kHIDUsage_GD_Vx = 0x40, /* Dynamic Value */
958  kHIDUsage_GD_Vy = 0x41, /* Dynamic Value */
959  kHIDUsage_GD_Vz = 0x42, /* Dynamic Value */
960  kHIDUsage_GD_Vbrx = 0x43, /* Dynamic Value */
961  kHIDUsage_GD_Vbry = 0x44, /* Dynamic Value */
962  kHIDUsage_GD_Vbrz = 0x45, /* Dynamic Value */
963  kHIDUsage_GD_Vno = 0x46, /* Dynamic Value */
964  /* 0x47 - 0x7F Reserved */
965  kHIDUsage_GD_SystemControl = 0x80, /* Application Collection */
966  kHIDUsage_GD_SystemPowerDown = 0x81, /* One-Shot Control */
967  kHIDUsage_GD_SystemSleep = 0x82, /* One-Shot Control */
968  kHIDUsage_GD_SystemWakeUp = 0x83, /* One-Shot Control */
969  kHIDUsage_GD_SystemContextMenu = 0x84, /* One-Shot Control */
970  kHIDUsage_GD_SystemMainMenu = 0x85, /* One-Shot Control */
971  kHIDUsage_GD_SystemAppMenu = 0x86, /* One-Shot Control */
972  kHIDUsage_GD_SystemMenuHelp = 0x87, /* One-Shot Control */
973  kHIDUsage_GD_SystemMenuExit = 0x88, /* One-Shot Control */
974  kHIDUsage_GD_SystemMenu = 0x89, /* Selector */
975  kHIDUsage_GD_SystemMenuRight = 0x8A, /* Re-Trigger Control */
976  kHIDUsage_GD_SystemMenuLeft = 0x8B, /* Re-Trigger Control */
977  kHIDUsage_GD_SystemMenuUp = 0x8C, /* Re-Trigger Control */
978  kHIDUsage_GD_SystemMenuDown = 0x8D, /* Re-Trigger Control */
979  /* 0x8E - 0x8F Reserved */
980  kHIDUsage_GD_DPadUp = 0x90, /* On/Off Control */
981  kHIDUsage_GD_DPadDown = 0x91, /* On/Off Control */
982  kHIDUsage_GD_DPadRight = 0x92, /* On/Off Control */
983  kHIDUsage_GD_DPadLeft = 0x93, /* On/Off Control */
984  /* 0x94 - 0xFFFF Reserved */
985  kHIDUsage_GD_Reserved = 0xFFFF
986  };
987 
988  /* Simulation Page (0x02) */
989  /* This section provides detailed descriptions of the usages employed by
990  * simulation devices. */
991  enum
992  {
993  kHIDUsage_Sim_FlightSimulationDevice = 0x01, /* Application Collection */
994  kHIDUsage_Sim_AutomobileSimulationDevice = 0x02, /* Application Collection */
995  kHIDUsage_Sim_TankSimulationDevice = 0x03, /* Application Collection */
996  kHIDUsage_Sim_SpaceshipSimulationDevice = 0x04, /* Application Collection */
997  kHIDUsage_Sim_SubmarineSimulationDevice = 0x05, /* Application Collection */
998  kHIDUsage_Sim_SailingSimulationDevice = 0x06, /* Application Collection */
999  kHIDUsage_Sim_MotorcycleSimulationDevice = 0x07, /* Application Collection */
1000  kHIDUsage_Sim_SportsSimulationDevice = 0x08, /* Application Collection */
1001  kHIDUsage_Sim_AirplaneSimulationDevice = 0x09, /* Application Collection */
1002  kHIDUsage_Sim_HelicopterSimulationDevice = 0x0A, /* Application Collection */
1003  kHIDUsage_Sim_MagicCarpetSimulationDevice = 0x0B, /* Application Collection */
1004  kHIDUsage_Sim_BicycleSimulationDevice = 0x0C, /* Application Collection */
1005  /* 0x0D - 0x1F Reserved */
1006  kHIDUsage_Sim_FlightControlStick = 0x20, /* Application Collection */
1007  kHIDUsage_Sim_FlightStick = 0x21, /* Application Collection */
1008  kHIDUsage_Sim_CyclicControl = 0x22, /* Physical Collection */
1009  kHIDUsage_Sim_CyclicTrim = 0x23, /* Physical Collection */
1010  kHIDUsage_Sim_FlightYoke = 0x24, /* Application Collection */
1011  kHIDUsage_Sim_TrackControl = 0x25, /* Physical Collection */
1012  /* 0x26 - 0xAF Reserved */
1013  kHIDUsage_Sim_Aileron = 0xB0, /* Dynamic Value */
1014  kHIDUsage_Sim_AileronTrim = 0xB1, /* Dynamic Value */
1015  kHIDUsage_Sim_AntiTorqueControl = 0xB2, /* Dynamic Value */
1016  kHIDUsage_Sim_AutopilotEnable = 0xB3, /* On/Off Control */
1017  kHIDUsage_Sim_ChaffRelease = 0xB4, /* One-Shot Control */
1018  kHIDUsage_Sim_CollectiveControl = 0xB5, /* Dynamic Value */
1019  kHIDUsage_Sim_DiveBrake = 0xB6, /* Dynamic Value */
1020  kHIDUsage_Sim_ElectronicCountermeasures = 0xB7, /* On/Off Control */
1021  kHIDUsage_Sim_Elevator = 0xB8, /* Dynamic Value */
1022  kHIDUsage_Sim_ElevatorTrim = 0xB9, /* Dynamic Value */
1023  kHIDUsage_Sim_Rudder = 0xBA, /* Dynamic Value */
1024  kHIDUsage_Sim_Throttle = 0xBB, /* Dynamic Value */
1025  kHIDUsage_Sim_FlightCommunications = 0xBC, /* On/Off Control */
1026  kHIDUsage_Sim_FlareRelease = 0xBD, /* One-Shot Control */
1027  kHIDUsage_Sim_LandingGear = 0xBE, /* On/Off Control */
1028  kHIDUsage_Sim_ToeBrake = 0xBF, /* Dynamic Value */
1029  kHIDUsage_Sim_Trigger = 0xC0, /* Momentary Control */
1030  kHIDUsage_Sim_WeaponsArm = 0xC1, /* On/Off Control */
1031  kHIDUsage_Sim_Weapons = 0xC2, /* Selector */
1032  kHIDUsage_Sim_WingFlaps = 0xC3, /* Dynamic Value */
1033  kHIDUsage_Sim_Accelerator = 0xC4, /* Dynamic Value */
1034  kHIDUsage_Sim_Brake = 0xC5, /* Dynamic Value */
1035  kHIDUsage_Sim_Clutch = 0xC6, /* Dynamic Value */
1036  kHIDUsage_Sim_Shifter = 0xC7, /* Dynamic Value */
1037  kHIDUsage_Sim_Steering = 0xC8, /* Dynamic Value */
1038  kHIDUsage_Sim_TurretDirection = 0xC9, /* Dynamic Value */
1039  kHIDUsage_Sim_BarrelElevation = 0xCA, /* Dynamic Value */
1040  kHIDUsage_Sim_DivePlane = 0xCB, /* Dynamic Value */
1041  kHIDUsage_Sim_Ballast = 0xCC, /* Dynamic Value */
1042  kHIDUsage_Sim_BicycleCrank = 0xCD, /* Dynamic Value */
1043  kHIDUsage_Sim_HandleBars = 0xCE, /* Dynamic Value */
1044  kHIDUsage_Sim_FrontBrake = 0xCF, /* Dynamic Value */
1045  kHIDUsage_Sim_RearBrake = 0xD0, /* Dynamic Value */
1046  /* 0xD1 - 0xFFFF Reserved */
1047  kHIDUsage_Sim_Reserved = 0xFFFF
1048  };
1049 
1050  /* VR Page (0x03) */
1051  /* Virtual Reality controls depend on designators to identify the individual
1052  * controls. Most of the following are */
1053  /* usages are applied to the collections of entities that comprise the actual
1054  * device. */
1055  enum
1056  {
1057  kHIDUsage_VR_Belt = 0x01, /* Application Collection */
1058  kHIDUsage_VR_BodySuit = 0x02, /* Application Collection */
1059  kHIDUsage_VR_Flexor = 0x03, /* Physical Collection */
1060  kHIDUsage_VR_Glove = 0x04, /* Application Collection */
1061  kHIDUsage_VR_HeadTracker = 0x05, /* Physical Collection */
1062  kHIDUsage_VR_HeadMountedDisplay = 0x06, /* Application Collection */
1063  kHIDUsage_VR_HandTracker = 0x07, /* Application Collection */
1064  kHIDUsage_VR_Oculometer = 0x08, /* Application Collection */
1065  kHIDUsage_VR_Vest = 0x09, /* Application Collection */
1066  kHIDUsage_VR_AnimatronicDevice = 0x0A, /* Application Collection */
1067  /* 0x0B - 0x1F Reserved */
1068  kHIDUsage_VR_StereoEnable = 0x20, /* On/Off Control */
1069  kHIDUsage_VR_DisplayEnable = 0x21, /* On/Off Control */
1070  /* 0x22 - 0xFFFF Reserved */
1071  kHIDUsage_VR_Reserved = 0xFFFF
1072  };
1073 
1074  /* Sport Page (0x04) */
1075  enum
1076  {
1077  kHIDUsage_Sprt_BaseballBat = 0x01, /* Application Collection */
1078  kHIDUsage_Sprt_GolfClub = 0x02, /* Application Collection */
1079  kHIDUsage_Sprt_RowingMachine = 0x03, /* Application Collection */
1080  kHIDUsage_Sprt_Treadmill = 0x04, /* Application Collection */
1081  /* 0x05 - 0x2F Reserved */
1082  kHIDUsage_Sprt_Oar = 0x30, /* Dynamic Value */
1083  kHIDUsage_Sprt_Slope = 0x31, /* Dynamic Value */
1084  kHIDUsage_Sprt_Rate = 0x32, /* Dynamic Value */
1085  kHIDUsage_Sprt_StickSpeed = 0x33, /* Dynamic Value */
1086  kHIDUsage_Sprt_StickFaceAngle = 0x34, /* Dynamic Value */
1087  kHIDUsage_Sprt_StickHeelOrToe = 0x35, /* Dynamic Value */
1088  kHIDUsage_Sprt_StickFollowThrough = 0x36, /* Dynamic Value */
1089  kHIDUsage_Sprt_StickTempo = 0x37, /* Dynamic Value */
1090  kHIDUsage_Sprt_StickType = 0x38, /* Named Array */
1091  kHIDUsage_Sprt_StickHeight = 0x39, /* Dynamic Value */
1092  /* 0x3A - 0x4F Reserved */
1093  kHIDUsage_Sprt_Putter = 0x50, /* Selector */
1094  kHIDUsage_Sprt_1Iron = 0x51, /* Selector */
1095  kHIDUsage_Sprt_2Iron = 0x52, /* Selector */
1096  kHIDUsage_Sprt_3Iron = 0x53, /* Selector */
1097  kHIDUsage_Sprt_4Iron = 0x54, /* Selector */
1098  kHIDUsage_Sprt_5Iron = 0x55, /* Selector */
1099  kHIDUsage_Sprt_6Iron = 0x56, /* Selector */
1100  kHIDUsage_Sprt_7Iron = 0x57, /* Selector */
1101  kHIDUsage_Sprt_8Iron = 0x58, /* Selector */
1102  kHIDUsage_Sprt_9Iron = 0x59, /* Selector */
1103  kHIDUsage_Sprt_10Iron = 0x5A, /* Selector */
1104  kHIDUsage_Sprt_11Iron = 0x5B, /* Selector */
1105  kHIDUsage_Sprt_SandWedge = 0x5C, /* Selector */
1106  kHIDUsage_Sprt_LoftWedge = 0x5D, /* Selector */
1107  kHIDUsage_Sprt_PowerWedge = 0x5E, /* Selector */
1108  kHIDUsage_Sprt_1Wood = 0x5F, /* Selector */
1109  kHIDUsage_Sprt_3Wood = 0x60, /* Selector */
1110  kHIDUsage_Sprt_5Wood = 0x61, /* Selector */
1111  kHIDUsage_Sprt_7Wood = 0x62, /* Selector */
1112  kHIDUsage_Sprt_9Wood = 0x63, /* Selector */
1113  /* 0x64 - 0xFFFF Reserved */
1114  kHIDUsage_Sprt_Reserved = 0xFFFF
1115  };
1116 
1117  /* Game Page (0x05) */
1118  enum
1119  {
1120  kHIDUsage_Game_3DGameController = 0x01, /* Application Collection */
1121  kHIDUsage_Game_PinballDevice = 0x02, /* Application Collection */
1122  kHIDUsage_Game_GunDevice = 0x03, /* Application Collection */
1123  /* 0x04 - 0x1F Reserved */
1124  kHIDUsage_Game_PointofView = 0x20, /* Physical Collection */
1125  kHIDUsage_Game_TurnRightOrLeft = 0x21, /* Dynamic Value */
1126  kHIDUsage_Game_PitchUpOrDown = 0x22, /* Dynamic Value */
1127  kHIDUsage_Game_RollRightOrLeft = 0x23, /* Dynamic Value */
1128  kHIDUsage_Game_MoveRightOrLeft = 0x24, /* Dynamic Value */
1129  kHIDUsage_Game_MoveForwardOrBackward = 0x25, /* Dynamic Value */
1130  kHIDUsage_Game_MoveUpOrDown = 0x26, /* Dynamic Value */
1131  kHIDUsage_Game_LeanRightOrLeft = 0x27, /* Dynamic Value */
1132  kHIDUsage_Game_LeanForwardOrBackward = 0x28, /* Dynamic Value */
1133  kHIDUsage_Game_HeightOfPOV = 0x29, /* Dynamic Value */
1134  kHIDUsage_Game_Flipper = 0x2A, /* Momentary Control */
1135  kHIDUsage_Game_SecondaryFlipper = 0x2B, /* Momentary Control */
1136  kHIDUsage_Game_Bump = 0x2C, /* Momentary Control */
1137  kHIDUsage_Game_NewGame = 0x2D, /* One-Shot Control */
1138  kHIDUsage_Game_ShootBall = 0x2E, /* One-Shot Control */
1139  kHIDUsage_Game_Player = 0x2F, /* One-Shot Control */
1140  kHIDUsage_Game_GunBolt = 0x30, /* On/Off Control */
1141  kHIDUsage_Game_GunClip = 0x31, /* On/Off Control */
1142  kHIDUsage_Game_Gun = 0x32, /* Selector */
1143  kHIDUsage_Game_GunSingleShot = 0x33, /* Selector */
1144  kHIDUsage_Game_GunBurst = 0x34, /* Selector */
1145  kHIDUsage_Game_GunAutomatic = 0x35, /* Selector */
1146  kHIDUsage_Game_GunSafety = 0x36, /* On/Off Control */
1147  kHIDUsage_Game_GamepadFireOrJump = 0x37, /* Logical Collection */
1148  kHIDUsage_Game_GamepadTrigger = 0x39, /* Logical Collection */
1149  /* 0x3A - 0xFFFF Reserved */
1150  kHIDUsage_Game_Reserved = 0xFFFF
1151  };
1152 
1153  /* KeyboardOrKeypad Page (0x07) */
1154  /* This section is the Usage Page for key codes to be used in implementing a USB
1155  * keyboard. */
1156  /* A Boot Keyboard (84-, 101- or 104-key) should at a minimum support all
1157  * associated usage codes as */
1158  /* indicated in the �Boot� column below. */
1159  /* The usage type of all key codes is Selectors (Sel), except for the modifier
1160  * keys Keyboard Left Control (0x224) */
1161  /* to Keyboard Right GUI (0x231) which are Dynamic Flags (DV). */
1162  /* Note: A general note on Usages and languages: */
1163  /* Due to the variation of keyboards from language to language, it is not
1164  * feasible to specify exact key mappings */
1165  /* for every language. Where this list is not specific for a key function in a
1166  * language, the closest equivalent key */
1167  /* position should be used, so that a keyboard may be modified for a different
1168  * language by simply printing different */
1169  /* keycaps. One example is the Y key on a North American keyboard. In Germany
1170  * this is typically Z. Rather than changing */
1171  /* the keyboard firmware to put the Z Usage into that place in the descriptor
1172  * list, the vendor should use the Y Usage on */
1173  /* both the North American and German keyboards. This continues to be the
1174  * existing practice in the industry, in order to */
1175  /* minimize the number of changes to the electronics to accommodate
1176  * otherlanguages. */
1177  enum
1178  {
1179  kHIDUsage_KeyboardErrorRollOver = 0x01, /* ErrorRollOver */
1180  kHIDUsage_KeyboardPOSTFail = 0x02, /* POSTFail */
1181  kHIDUsage_KeyboardErrorUndefined = 0x03, /* ErrorUndefined */
1182  kHIDUsage_KeyboardA = 0x04, /* a or A */
1183  kHIDUsage_KeyboardB = 0x05, /* b or B */
1184  kHIDUsage_KeyboardC = 0x06, /* c or C */
1185  kHIDUsage_KeyboardD = 0x07, /* d or D */
1186  kHIDUsage_KeyboardE = 0x08, /* e or E */
1187  kHIDUsage_KeyboardF = 0x09, /* f or F */
1188  kHIDUsage_KeyboardG = 0x0A, /* g or G */
1189  kHIDUsage_KeyboardH = 0x0B, /* h or H */
1190  kHIDUsage_KeyboardI = 0x0C, /* i or I */
1191  kHIDUsage_KeyboardJ = 0x0D, /* j or J */
1192  kHIDUsage_KeyboardK = 0x0E, /* k or K */
1193  kHIDUsage_KeyboardL = 0x0F, /* l or L */
1194  kHIDUsage_KeyboardM = 0x10, /* m or M */
1195  kHIDUsage_KeyboardN = 0x11, /* n or N */
1196  kHIDUsage_KeyboardO = 0x12, /* o or O */
1197  kHIDUsage_KeyboardP = 0x13, /* p or P */
1198  kHIDUsage_KeyboardQ = 0x14, /* q or Q */
1199  kHIDUsage_KeyboardR = 0x15, /* r or R */
1200  kHIDUsage_KeyboardS = 0x16, /* s or S */
1201  kHIDUsage_KeyboardT = 0x17, /* t or T */
1202  kHIDUsage_KeyboardU = 0x18, /* u or U */
1203  kHIDUsage_KeyboardV = 0x19, /* v or V */
1204  kHIDUsage_KeyboardW = 0x1A, /* w or W */
1205  kHIDUsage_KeyboardX = 0x1B, /* x or X */
1206  kHIDUsage_KeyboardY = 0x1C, /* y or Y */
1207  kHIDUsage_KeyboardZ = 0x1D, /* z or Z */
1208  kHIDUsage_Keyboard1 = 0x1E, /* 1 or ! */
1209  kHIDUsage_Keyboard2 = 0x1F, /* 2 or @ */
1210  kHIDUsage_Keyboard3 = 0x20, /* 3 or # */
1211  kHIDUsage_Keyboard4 = 0x21, /* 4 or $ */
1212  kHIDUsage_Keyboard5 = 0x22, /* 5 or % */
1213  kHIDUsage_Keyboard6 = 0x23, /* 6 or ^ */
1214  kHIDUsage_Keyboard7 = 0x24, /* 7 or & */
1215  kHIDUsage_Keyboard8 = 0x25, /* 8 or * */
1216  kHIDUsage_Keyboard9 = 0x26, /* 9 or ( */
1217  kHIDUsage_Keyboard0 = 0x27, /* 0 or ) */
1218  kHIDUsage_KeyboardReturnOrEnter = 0x28, /* Return (Enter) */
1219  kHIDUsage_KeyboardEscape = 0x29, /* Escape */
1220  kHIDUsage_KeyboardDeleteOrBackspace = 0x2A, /* Delete (Backspace) */
1221  kHIDUsage_KeyboardTab = 0x2B, /* Tab */
1222  kHIDUsage_KeyboardSpacebar = 0x2C, /* Spacebar */
1223  kHIDUsage_KeyboardHyphen = 0x2D, /* - or _ */
1224  kHIDUsage_KeyboardEqualSign = 0x2E, /* = or + */
1225  kHIDUsage_KeyboardOpenBracket = 0x2F, /* [ or { */
1226  kHIDUsage_KeyboardCloseBracket = 0x30, /* ] or } */
1227  kHIDUsage_KeyboardBackslash = 0x31, /* \ or | */
1228  kHIDUsage_KeyboardNonUSPound = 0x32, /* Non-US # or _ */
1229  kHIDUsage_KeyboardSemicolon = 0x33, /* ; or : */
1230  kHIDUsage_KeyboardQuote = 0x34, /* ' or " */
1231  kHIDUsage_KeyboardGraveAccentAndTilde = 0x35, /* Grave Accent and Tilde */
1232  kHIDUsage_KeyboardComma = 0x36, /* , or < */
1233  kHIDUsage_KeyboardPeriod = 0x37, /* . or > */
1234  kHIDUsage_KeyboardSlash = 0x38, /* / or ? */
1235  kHIDUsage_KeyboardCapsLock = 0x39, /* Caps Lock */
1236  kHIDUsage_KeyboardF1 = 0x3A, /* F1 */
1237  kHIDUsage_KeyboardF2 = 0x3B, /* F2 */
1238  kHIDUsage_KeyboardF3 = 0x3C, /* F3 */
1239  kHIDUsage_KeyboardF4 = 0x3D, /* F4 */
1240  kHIDUsage_KeyboardF5 = 0x3E, /* F5 */
1241  kHIDUsage_KeyboardF6 = 0x3F, /* F6 */
1242  kHIDUsage_KeyboardF7 = 0x40, /* F7 */
1243  kHIDUsage_KeyboardF8 = 0x41, /* F8 */
1244  kHIDUsage_KeyboardF9 = 0x42, /* F9 */
1245  kHIDUsage_KeyboardF10 = 0x43, /* F10 */
1246  kHIDUsage_KeyboardF11 = 0x44, /* F11 */
1247  kHIDUsage_KeyboardF12 = 0x45, /* F12 */
1248  kHIDUsage_KeyboardPrintScreen = 0x46, /* Print Screen */
1249  kHIDUsage_KeyboardScrollLock = 0x47, /* Scroll Lock */
1250  kHIDUsage_KeyboardPause = 0x48, /* Pause */
1251  kHIDUsage_KeyboardInsert = 0x49, /* Insert */
1252  kHIDUsage_KeyboardHome = 0x4A, /* Home */
1253  kHIDUsage_KeyboardPageUp = 0x4B, /* Page Up */
1254  kHIDUsage_KeyboardDeleteForward = 0x4C, /* Delete Forward */
1255  kHIDUsage_KeyboardEnd = 0x4D, /* End */
1256  kHIDUsage_KeyboardPageDown = 0x4E, /* Page Down */
1257  kHIDUsage_KeyboardRightArrow = 0x4F, /* Right Arrow */
1258  kHIDUsage_KeyboardLeftArrow = 0x50, /* Left Arrow */
1259  kHIDUsage_KeyboardDownArrow = 0x51, /* Down Arrow */
1260  kHIDUsage_KeyboardUpArrow = 0x52, /* Up Arrow */
1261  kHIDUsage_KeypadNumLock = 0x53, /* Keypad NumLock or Clear */
1262  kHIDUsage_KeypadSlash = 0x54, /* Keypad / */
1263  kHIDUsage_KeypadAsterisk = 0x55, /* Keypad * */
1264  kHIDUsage_KeypadHyphen = 0x56, /* Keypad - */
1265  kHIDUsage_KeypadPlus = 0x57, /* Keypad + */
1266  kHIDUsage_KeypadEnter = 0x58, /* Keypad Enter */
1267  kHIDUsage_Keypad1 = 0x59, /* Keypad 1 or End */
1268  kHIDUsage_Keypad2 = 0x5A, /* Keypad 2 or Down Arrow */
1269  kHIDUsage_Keypad3 = 0x5B, /* Keypad 3 or Page Down */
1270  kHIDUsage_Keypad4 = 0x5C, /* Keypad 4 or Left Arrow */
1271  kHIDUsage_Keypad5 = 0x5D, /* Keypad 5 */
1272  kHIDUsage_Keypad6 = 0x5E, /* Keypad 6 or Right Arrow */
1273  kHIDUsage_Keypad7 = 0x5F, /* Keypad 7 or Home */
1274  kHIDUsage_Keypad8 = 0x60, /* Keypad 8 or Up Arrow */
1275  kHIDUsage_Keypad9 = 0x61, /* Keypad 9 or Page Up */
1276  kHIDUsage_Keypad0 = 0x62, /* Keypad 0 or Insert */
1277  kHIDUsage_KeypadPeriod = 0x63, /* Keypad . or Delete */
1278  kHIDUsage_KeyboardNonUSBackslash = 0x64, /* Non-US \ or | */
1279  kHIDUsage_KeyboardApplication = 0x65, /* Application */
1280  kHIDUsage_KeyboardPower = 0x66, /* Power */
1281  kHIDUsage_KeypadEqualSign = 0x67, /* Keypad = */
1282  kHIDUsage_KeyboardF13 = 0x68, /* F13 */
1283  kHIDUsage_KeyboardF14 = 0x69, /* F14 */
1284  kHIDUsage_KeyboardF15 = 0x6A, /* F15 */
1285  kHIDUsage_KeyboardF16 = 0x6B, /* F16 */
1286  kHIDUsage_KeyboardF17 = 0x6C, /* F17 */
1287  kHIDUsage_KeyboardF18 = 0x6D, /* F18 */
1288  kHIDUsage_KeyboardF19 = 0x6E, /* F19 */
1289  kHIDUsage_KeyboardF20 = 0x6F, /* F20 */
1290  kHIDUsage_KeyboardF21 = 0x70, /* F21 */
1291  kHIDUsage_KeyboardF22 = 0x71, /* F22 */
1292  kHIDUsage_KeyboardF23 = 0x72, /* F23 */
1293  kHIDUsage_KeyboardF24 = 0x73, /* F24 */
1294  kHIDUsage_KeyboardExecute = 0x74, /* Execute */
1295  kHIDUsage_KeyboardHelp = 0x75, /* Help */
1296  kHIDUsage_KeyboardMenu = 0x76, /* Menu */
1297  kHIDUsage_KeyboardSelect = 0x77, /* Select */
1298  kHIDUsage_KeyboardStop = 0x78, /* Stop */
1299  kHIDUsage_KeyboardAgain = 0x79, /* Again */
1300  kHIDUsage_KeyboardUndo = 0x7A, /* Undo */
1301  kHIDUsage_KeyboardCut = 0x7B, /* Cut */
1302  kHIDUsage_KeyboardCopy = 0x7C, /* Copy */
1303  kHIDUsage_KeyboardPaste = 0x7D, /* Paste */
1304  kHIDUsage_KeyboardFind = 0x7E, /* Find */
1305  kHIDUsage_KeyboardMute = 0x7F, /* Mute */
1306  kHIDUsage_KeyboardVolumeUp = 0x80, /* Volume Up */
1307  kHIDUsage_KeyboardVolumeDown = 0x81, /* Volume Down */
1308  kHIDUsage_KeyboardLockingCapsLock = 0x82, /* Locking Caps Lock */
1309  kHIDUsage_KeyboardLockingNumLock = 0x83, /* Locking Num Lock */
1310  kHIDUsage_KeyboardLockingScrollLock = 0x84, /* Locking Scroll Lock */
1311  kHIDUsage_KeypadComma = 0x85, /* Keypad Comma */
1312  kHIDUsage_KeypadEqualSignAS400 = 0x86, /* Keypad Equal Sign for AS/400 */
1313  kHIDUsage_KeyboardInternational1 = 0x87, /* International1 */
1314  kHIDUsage_KeyboardInternational2 = 0x88, /* International2 */
1315  kHIDUsage_KeyboardInternational3 = 0x89, /* International3 */
1316  kHIDUsage_KeyboardInternational4 = 0x8A, /* International4 */
1317  kHIDUsage_KeyboardInternational5 = 0x8B, /* International5 */
1318  kHIDUsage_KeyboardInternational6 = 0x8C, /* International6 */
1319  kHIDUsage_KeyboardInternational7 = 0x8D, /* International7 */
1320  kHIDUsage_KeyboardInternational8 = 0x8E, /* International8 */
1321  kHIDUsage_KeyboardInternational9 = 0x8F, /* International9 */
1322  kHIDUsage_KeyboardLANG1 = 0x90, /* LANG1 */
1323  kHIDUsage_KeyboardLANG2 = 0x91, /* LANG2 */
1324  kHIDUsage_KeyboardLANG3 = 0x92, /* LANG3 */
1325  kHIDUsage_KeyboardLANG4 = 0x93, /* LANG4 */
1326  kHIDUsage_KeyboardLANG5 = 0x94, /* LANG5 */
1327  kHIDUsage_KeyboardLANG6 = 0x95, /* LANG6 */
1328  kHIDUsage_KeyboardLANG7 = 0x96, /* LANG7 */
1329  kHIDUsage_KeyboardLANG8 = 0x97, /* LANG8 */
1330  kHIDUsage_KeyboardLANG9 = 0x98, /* LANG9 */
1331  kHIDUsage_KeyboardAlternateErase = 0x99, /* AlternateErase */
1332  kHIDUsage_KeyboardSysReqOrAttention = 0x9A, /* SysReq/Attention */
1333  kHIDUsage_KeyboardCancel = 0x9B, /* Cancel */
1334  kHIDUsage_KeyboardClear = 0x9C, /* Clear */
1335  kHIDUsage_KeyboardPrior = 0x9D, /* Prior */
1336  kHIDUsage_KeyboardReturn = 0x9E, /* Return */
1337  kHIDUsage_KeyboardSeparator = 0x9F, /* Separator */
1338  kHIDUsage_KeyboardOut = 0xA0, /* Out */
1339  kHIDUsage_KeyboardOper = 0xA1, /* Oper */
1340  kHIDUsage_KeyboardClearOrAgain = 0xA2, /* Clear/Again */
1341  kHIDUsage_KeyboardCrSelOrProps = 0xA3, /* CrSel/Props */
1342  kHIDUsage_KeyboardExSel = 0xA4, /* ExSel */
1343  /* 0xA5-0xDF Reserved */
1344  kHIDUsage_KeyboardLeftControl = 0xE0, /* Left Control */
1345  kHIDUsage_KeyboardLeftShift = 0xE1, /* Left Shift */
1346  kHIDUsage_KeyboardLeftAlt = 0xE2, /* Left Alt */
1347  kHIDUsage_KeyboardLeftGUI = 0xE3, /* Left GUI */
1348  kHIDUsage_KeyboardRightControl = 0xE4, /* Right Control */
1349  kHIDUsage_KeyboardRightShift = 0xE5, /* Right Shift */
1350  kHIDUsage_KeyboardRightAlt = 0xE6, /* Right Alt */
1351  kHIDUsage_KeyboardRightGUI = 0xE7, /* Right GUI */
1352  /* 0xE8-0xFFFF Reserved */
1353  kHIDUsage_Keyboard_Reserved = 0xFFFF
1354  };
1355 
1356  /* LEDs Page (0x08) */
1357  /* An LED or indicator is implemented as an On/Off Control (OOF) using the
1358  �Single button toggle� mode,
1359  |* where a value of 1 will turn on the indicator, and a value of 0 will turn it
1360  off. The exceptions are described below. */
1361  enum
1362  {
1363  kHIDUsage_LED_NumLock = 0x01, /* On/Off Control */
1364  kHIDUsage_LED_CapsLock = 0x02, /* On/Off Control */
1365  kHIDUsage_LED_ScrollLock = 0x03, /* On/Off Control */
1366  kHIDUsage_LED_Compose = 0x04, /* On/Off Control */
1367  kHIDUsage_LED_Kana = 0x05, /* On/Off Control */
1368  kHIDUsage_LED_Power = 0x06, /* On/Off Control */
1369  kHIDUsage_LED_Shift = 0x07, /* On/Off Control */
1370  kHIDUsage_LED_DoNotDisturb = 0x08, /* On/Off Control */
1371  kHIDUsage_LED_Mute = 0x09, /* On/Off Control */
1372  kHIDUsage_LED_ToneEnable = 0x0A, /* On/Off Control */
1373  kHIDUsage_LED_HighCutFilter = 0x0B, /* On/Off Control */
1374  kHIDUsage_LED_LowCutFilter = 0x0C, /* On/Off Control */
1375  kHIDUsage_LED_EqualizerEnable = 0x0D, /* On/Off Control */
1376  kHIDUsage_LED_SoundFieldOn = 0x0E, /* On/Off Control */
1377  kHIDUsage_LED_SurroundOn = 0x0F, /* On/Off Control */
1378  kHIDUsage_LED_Repeat = 0x10, /* On/Off Control */
1379  kHIDUsage_LED_Stereo = 0x11, /* On/Off Control */
1380  kHIDUsage_LED_SamplingRateDetect = 0x12, /* On/Off Control */
1381  kHIDUsage_LED_Spinning = 0x13, /* On/Off Control */
1382  kHIDUsage_LED_CAV = 0x14, /* On/Off Control */
1383  kHIDUsage_LED_CLV = 0x15, /* On/Off Control */
1384  kHIDUsage_LED_RecordingFormatDetect = 0x16, /* On/Off Control */
1385  kHIDUsage_LED_OffHook = 0x17, /* On/Off Control */
1386  kHIDUsage_LED_Ring = 0x18, /* On/Off Control */
1387  kHIDUsage_LED_MessageWaiting = 0x19, /* On/Off Control */
1388  kHIDUsage_LED_DataMode = 0x1A, /* On/Off Control */
1389  kHIDUsage_LED_BatteryOperation = 0x1B, /* On/Off Control */
1390  kHIDUsage_LED_BatteryOK = 0x1C, /* On/Off Control */
1391  kHIDUsage_LED_BatteryLow = 0x1D, /* On/Off Control */
1392  kHIDUsage_LED_Speaker = 0x1E, /* On/Off Control */
1393  kHIDUsage_LED_HeadSet = 0x1F, /* On/Off Control */
1394  kHIDUsage_LED_Hold = 0x20, /* On/Off Control */
1395  kHIDUsage_LED_Microphone = 0x21, /* On/Off Control */
1396  kHIDUsage_LED_Coverage = 0x22, /* On/Off Control */
1397  kHIDUsage_LED_NightMode = 0x23, /* On/Off Control */
1398  kHIDUsage_LED_SendCalls = 0x24, /* On/Off Control */
1399  kHIDUsage_LED_CallPickup = 0x25, /* On/Off Control */
1400  kHIDUsage_LED_Conference = 0x26, /* On/Off Control */
1401  kHIDUsage_LED_StandBy = 0x27, /* On/Off Control */
1402  kHIDUsage_LED_CameraOn = 0x28, /* On/Off Control */
1403  kHIDUsage_LED_CameraOff = 0x29, /* On/Off Control */
1404  kHIDUsage_LED_OnLine = 0x2A, /* On/Off Control */
1405  kHIDUsage_LED_OffLine = 0x2B, /* On/Off Control */
1406  kHIDUsage_LED_Busy = 0x2C, /* On/Off Control */
1407  kHIDUsage_LED_Ready = 0x2D, /* On/Off Control */
1408  kHIDUsage_LED_PaperOut = 0x2E, /* On/Off Control */
1409  kHIDUsage_LED_PaperJam = 0x2F, /* On/Off Control */
1410  kHIDUsage_LED_Remote = 0x30, /* On/Off Control */
1411  kHIDUsage_LED_Forward = 0x31, /* On/Off Control */
1412  kHIDUsage_LED_Reverse = 0x32, /* On/Off Control */
1413  kHIDUsage_LED_Stop = 0x33, /* On/Off Control */
1414  kHIDUsage_LED_Rewind = 0x34, /* On/Off Control */
1415  kHIDUsage_LED_FastForward = 0x35, /* On/Off Control */
1416  kHIDUsage_LED_Play = 0x36, /* On/Off Control */
1417  kHIDUsage_LED_Pause = 0x37, /* On/Off Control */
1418  kHIDUsage_LED_Record = 0x38, /* On/Off Control */
1419  kHIDUsage_LED_Error = 0x39, /* On/Off Control */
1420  kHIDUsage_LED_Usage = 0x3A, /* Selector */
1421  kHIDUsage_LED_UsageInUseIndicator = 0x3B, /* Usage Switch */
1422  kHIDUsage_LED_UsageMultiModeIndicator = 0x3C, /* Usage Modifier */
1423  kHIDUsage_LED_IndicatorOn = 0x3D, /* Selector */
1424  kHIDUsage_LED_IndicatorFlash = 0x3E, /* Selector */
1425  kHIDUsage_LED_IndicatorSlowBlink = 0x3F, /* Selector */
1426  kHIDUsage_LED_IndicatorFastBlink = 0x40, /* Selector */
1427  kHIDUsage_LED_IndicatorOff = 0x41, /* Selector */
1428  kHIDUsage_LED_FlashOnTime = 0x42, /* Dynamic Value */
1429  kHIDUsage_LED_SlowBlinkOnTime = 0x43, /* Dynamic Value */
1430  kHIDUsage_LED_SlowBlinkOffTime = 0x44, /* Dynamic Value */
1431  kHIDUsage_LED_FastBlinkOnTime = 0x45, /* Dynamic Value */
1432  kHIDUsage_LED_FastBlinkOffTime = 0x46, /* Dynamic Value */
1433  kHIDUsage_LED_UsageIndicatorColor = 0x47, /* Usage Modifier */
1434  kHIDUsage_LED_IndicatorRed = 0x48, /* Selector */
1435  kHIDUsage_LED_IndicatorGreen = 0x49, /* Selector */
1436  kHIDUsage_LED_IndicatorAmber = 0x4A, /* Selector */
1437  kHIDUsage_LED_GenericIndicator = 0x4B, /* On/Off Control */
1438  kHIDUsage_LED_SystemSuspend = 0x4C, /* On/Off Control */
1439  kHIDUsage_LED_ExternalPowerConnected = 0x4D, /* On/Off Control */
1440  /* 0x4E - 0xFFFF Reserved */
1441  kHIDUsage_LED_Reserved = 0xFFFF
1442  };
1443 
1444  /* Button Page (0x09) */
1445  /* The Button page is the first place an application should look for user
1446  * selection controls. System graphical user */
1447  /* interfaces typically employ a pointer and a set of hierarchical selectors to
1448  * select, move and otherwise manipulate */
1449  /* their environment. For these purposes the following assignment of
1450  * significance can be applied to the Button usages: */
1451  /* � Button 1, Primary Button. Used for object selecting, dragging, and double
1452  click activation. On MacOS, this is the
1453  |* only button. Microsoft operating systems call this a logical left button,
1454  because it */
1455  /* is not necessarily physically located on the left of the pointing device.
1456  */
1457  /* � Button 2, Secondary Button. Used by newer graphical user interfaces to
1458  * browse object properties. Exposed by systems */
1459  /* to applications that typically assign application-specific functionality.
1460  */
1461  /* � Button 3, Tertiary Button. Optional control. Exposed to applications, but
1462  * seldom assigned functionality due to prevalence */
1463  /* of two- and one-button devices. */
1464  /* � Buttons 4 -55. As the button number increases, its significance as a
1465  * selector decreases. */
1466  /* In many ways the assignment of button numbers is similar to the assignment of
1467  * Effort in Physical descriptors. */
1468  /* Button 1 would be used to define the button a finger rests on when the hand
1469  * is in the �at rest� position, that is, virtually */
1470  /* no effort is required by the user to activate the button. Button values
1471  * increment as the finger has to stretch to reach a */
1472  /* control. See Section 6.2.3, �Physical Descriptors,� in the HID Specification
1473  * for methods of further qualifying buttons. */
1474  enum
1475  {
1476  kHIDUsage_Button_1 = 0x01, /* (primary/trigger) */
1477  kHIDUsage_Button_2 = 0x02, /* (secondary) */
1478  kHIDUsage_Button_3 = 0x03, /* (tertiary) */
1479  kHIDUsage_Button_4 = 0x04, /* 4th button */
1480  /* ... */
1481  kHIDUsage_Button_65535 = 0xFFFF
1482  };
1483 
1484  /* Ordinal Page (0x0A) */
1485  /* The Ordinal page allows multiple instances of a control or sets of controls
1486  * to be declared without requiring individual */
1487  /* enumeration in the native usage page. For example, it is not necessary to
1488  * declare usages of Pointer 1, Pointer 2, and so */
1489  /* forth on the Generic Desktop page. When parsed, the ordinal instance number
1490  * is, in essence, concatenated to the usages */
1491  /* attached to the encompassing collection to create Pointer 1, Pointer 2, and
1492  * so forth. */
1493  /* For an example, see Section A.5, �Multiple Instances of a Control,� in
1494  * Appendix A, �Usage Examples.� By convention, */
1495  /* an Ordinal collection is placed inside the collection for which it is
1496  * declaring multiple instances. */
1497  /* Instances do not have to be identical. */
1498  enum
1499  {
1500  /* 0x00 Reserved */
1501  kHIDUsage_Ord_Instance1 = 0x01, /* Usage Modifier */
1502  kHIDUsage_Ord_Instance2 = 0x02, /* Usage Modifier */
1503  kHIDUsage_Ord_Instance3 = 0x03, /* Usage Modifier */
1504  kHIDUsage_Ord_Instance4 = 0x04, /* Usage Modifier */
1505  kHIDUsage_Ord_Instance65535 = 0xFFFF /* Usage Modifier */
1506  };
1507 
1508  /* Telephony Page (0x0B) */
1509  /* This usage page defines the keytop and control usages for telephony devices.
1510  */
1511  /* Indicators on a phone are handled by wrapping them in LED: Usage In Use
1512  * Indicator and LED: Usage Selected Indicator */
1513  /* usages. For example, a message-indicator LED would be identified by a
1514  * Telephony: Message usage declared as a Feature */
1515  /* or Output in a LED: Usage In Use Indicator collection. */
1516  /* See Section 14, �Consumer Page (0x0C),� for audio volume and tone controls.
1517  */
1518  enum
1519  {
1520  kHIDUsage_Tfon_Phone = 0x01, /* Application Collection */
1521  kHIDUsage_Tfon_AnsweringMachine = 0x02, /* Application Collection */
1522  kHIDUsage_Tfon_MessageControls = 0x03, /* Logical Collection */
1523  kHIDUsage_Tfon_Handset = 0x04, /* Logical Collection */
1524  kHIDUsage_Tfon_Headset = 0x05, /* Logical Collection */
1525  kHIDUsage_Tfon_TelephonyKeyPad = 0x06, /* Named Array */
1526  kHIDUsage_Tfon_ProgrammableButton = 0x07, /* Named Array */
1527  /* 0x08 - 0x1F Reserved */
1528  kHIDUsage_Tfon_HookSwitch = 0x20, /* On/Off Control */
1529  kHIDUsage_Tfon_Flash = 0x21, /* Momentary Control */
1530  kHIDUsage_Tfon_Feature = 0x22, /* One-Shot Control */
1531  kHIDUsage_Tfon_Hold = 0x23, /* On/Off Control */
1532  kHIDUsage_Tfon_Redial = 0x24, /* One-Shot Control */
1533  kHIDUsage_Tfon_Transfer = 0x25, /* One-Shot Control */
1534  kHIDUsage_Tfon_Drop = 0x26, /* One-Shot Control */
1535  kHIDUsage_Tfon_Park = 0x27, /* On/Off Control */
1536  kHIDUsage_Tfon_ForwardCalls = 0x28, /* On/Off Control */
1537  kHIDUsage_Tfon_AlternateFunction = 0x29, /* Momentary Control */
1538  kHIDUsage_Tfon_Line = 0x2A, /* One-Shot Control */
1539  kHIDUsage_Tfon_SpeakerPhone = 0x2B, /* On/Off Control */
1540  kHIDUsage_Tfon_Conference = 0x2C, /* On/Off Control */
1541  kHIDUsage_Tfon_RingEnable = 0x2D, /* On/Off Control */
1542  kHIDUsage_Tfon_Ring = 0x2E, /* Selector */
1543  kHIDUsage_Tfon_PhoneMute = 0x2F, /* On/Off Control */
1544  kHIDUsage_Tfon_CallerID = 0x30, /* Momentary Control */
1545  /* 0x31 - 0x4F Reserved */
1546  kHIDUsage_Tfon_SpeedDial = 0x50, /* One-Shot Control */
1547  kHIDUsage_Tfon_StoreNumber = 0x51, /* One-Shot Control */
1548  kHIDUsage_Tfon_RecallNumber = 0x52, /* One-Shot Control */
1549  kHIDUsage_Tfon_PhoneDirectory = 0x53, /* On/Off Control */
1550  /* 0x54 - 0x6F Reserved */
1551  kHIDUsage_Tfon_VoiceMail = 0x70, /* On/Off Control */
1552  kHIDUsage_Tfon_ScreenCalls = 0x71, /* On/Off Control */
1553  kHIDUsage_Tfon_DoNotDisturb = 0x72, /* On/Off Control */
1554  kHIDUsage_Tfon_Message = 0x73, /* One-Shot Control */
1555  kHIDUsage_Tfon_AnswerOnOrOff = 0x74, /* On/Off Control */
1556  /* 0x75 - 0x8F Reserved */
1557  kHIDUsage_Tfon_InsideDialTone = 0x90, /* Momentary Control */
1558  kHIDUsage_Tfon_OutsideDialTone = 0x91, /* Momentary Control */
1559  kHIDUsage_Tfon_InsideRingTone = 0x92, /* Momentary Control */
1560  kHIDUsage_Tfon_OutsideRingTone = 0x93, /* Momentary Control */
1561  kHIDUsage_Tfon_PriorityRingTone = 0x94, /* Momentary Control */
1562  kHIDUsage_Tfon_InsideRingback = 0x95, /* Momentary Control */
1563  kHIDUsage_Tfon_PriorityRingback = 0x96, /* Momentary Control */
1564  kHIDUsage_Tfon_LineBusyTone = 0x97, /* Momentary Control */
1565  kHIDUsage_Tfon_ReorderTone = 0x98, /* Momentary Control */
1566  kHIDUsage_Tfon_CallWaitingTone = 0x99, /* Momentary Control */
1567  kHIDUsage_Tfon_ConfirmationTone1 = 0x9A, /* Momentary Control */
1568  kHIDUsage_Tfon_ConfirmationTone2 = 0x9B, /* Momentary Control */
1569  kHIDUsage_Tfon_TonesOff = 0x9C, /* On/Off Control */
1570  kHIDUsage_Tfon_OutsideRingback = 0x9D, /* Momentary Control */
1571  /* 0x9E - 0xAF Reserved */
1572  kHIDUsage_Tfon_PhoneKey0 = 0xB0, /* Selector/One-Shot Control */
1573  kHIDUsage_Tfon_PhoneKey1 = 0xB1, /* Selector/One-Shot Control */
1574  kHIDUsage_Tfon_PhoneKey2 = 0xB2, /* Selector/One-Shot Control */
1575  kHIDUsage_Tfon_PhoneKey3 = 0xB3, /* Selector/One-Shot Control */
1576  kHIDUsage_Tfon_PhoneKey4 = 0xB4, /* Selector/One-Shot Control */
1577  kHIDUsage_Tfon_PhoneKey5 = 0xB5, /* Selector/One-Shot Control */
1578  kHIDUsage_Tfon_PhoneKey6 = 0xB6, /* Selector/One-Shot Control */
1579  kHIDUsage_Tfon_PhoneKey7 = 0xB7, /* Selector/One-Shot Control */
1580  kHIDUsage_Tfon_PhoneKey8 = 0xB8, /* Selector/One-Shot Control */
1581  kHIDUsage_Tfon_PhoneKey9 = 0xB9, /* Selector/One-Shot Control */
1582  kHIDUsage_Tfon_PhoneKeyStar = 0xBA, /* Selector/One-Shot Control */
1583  kHIDUsage_Tfon_PhoneKeyPound = 0xBB, /* Selector/One-Shot Control */
1584  kHIDUsage_Tfon_PhoneKeyA = 0xBC, /* Selector/One-Shot Control */
1585  kHIDUsage_Tfon_PhoneKeyB = 0xBD, /* Selector/One-Shot Control */
1586  kHIDUsage_Tfon_PhoneKeyC = 0xBE, /* Selector/One-Shot Control */
1587  kHIDUsage_Tfon_PhoneKeyD = 0xBF, /* Selector/One-Shot Control */
1588  /* 0xC0 - 0xFFFF Reserved */
1589  kHIDUsage_TFon_Reserved = 0xFFFF
1590  };
1591 
1592  /* Consumer Page (0x0C) */
1593  /* All controls on the Consumer page are application-specific. That is, they
1594  * affect a specific device, not the system as a whole. */
1595  enum
1596  {
1597  kHIDUsage_Csmr_ConsumerControl = 0x01, /* Application Collection */
1598  kHIDUsage_Csmr_NumericKeyPad = 0x02, /* Named Array */
1599  kHIDUsage_Csmr_ProgrammableButtons = 0x03, /* Named Array */
1600  /* 0x03 - 0x1F Reserved */
1601  kHIDUsage_Csmr_Plus10 = 0x20, /* One-Shot Control */
1602  kHIDUsage_Csmr_Plus100 = 0x21, /* One-Shot Control */
1603  kHIDUsage_Csmr_AMOrPM = 0x22, /* One-Shot Control */
1604  /* 0x23 - 0x3F Reserved */
1605  kHIDUsage_Csmr_Power = 0x30, /* On/Off Control */
1606  kHIDUsage_Csmr_Reset = 0x31, /* One-Shot Control */
1607  kHIDUsage_Csmr_Sleep = 0x32, /* One-Shot Control */
1608  kHIDUsage_Csmr_SleepAfter = 0x33, /* One-Shot Control */
1609  kHIDUsage_Csmr_SleepMode = 0x34, /* Re-Trigger Control */
1610  kHIDUsage_Csmr_Illumination = 0x35, /* On/Off Control */
1611  kHIDUsage_Csmr_FunctionButtons = 0x36, /* Named Array */
1612  /* 0x37 - 0x3F Reserved */
1613  kHIDUsage_Csmr_Menu = 0x40, /* On/Off Control */
1614  kHIDUsage_Csmr_MenuPick = 0x41, /* One-Shot Control */
1615  kHIDUsage_Csmr_MenuUp = 0x42, /* One-Shot Control */
1616  kHIDUsage_Csmr_MenuDown = 0x43, /* One-Shot Control */
1617  kHIDUsage_Csmr_MenuLeft = 0x44, /* One-Shot Control */
1618  kHIDUsage_Csmr_MenuRight = 0x45, /* One-Shot Control */
1619  kHIDUsage_Csmr_MenuEscape = 0x46, /* One-Shot Control */
1620  kHIDUsage_Csmr_MenuValueIncrease = 0x47, /* One-Shot Control */
1621  kHIDUsage_Csmr_MenuValueDecrease = 0x48, /* One-Shot Control */
1622  /* 0x49 - 0x5F Reserved */
1623  kHIDUsage_Csmr_DataOnScreen = 0x60, /* On/Off Control */
1624  kHIDUsage_Csmr_ClosedCaption = 0x61, /* On/Off Control */
1625  kHIDUsage_Csmr_ClosedCaptionSelect = 0x62, /* Selector */
1626  kHIDUsage_Csmr_VCROrTV = 0x63, /* On/Off Control */
1627  kHIDUsage_Csmr_BroadcastMode = 0x64, /* One-Shot Control */
1628  kHIDUsage_Csmr_Snapshot = 0x65, /* One-Shot Control */
1629  kHIDUsage_Csmr_Still = 0x66, /* One-Shot Control */
1630  /* 0x67 - 0x7F Reserved */
1631  kHIDUsage_Csmr_Selection = 0x80, /* Named Array */
1632  kHIDUsage_Csmr_Assign = 0x81, /* Selector */
1633  kHIDUsage_Csmr_ModeStep = 0x82, /* One-Shot Control */
1634  kHIDUsage_Csmr_RecallLast = 0x83, /* One-Shot Control */
1635  kHIDUsage_Csmr_EnterChannel = 0x84, /* One-Shot Control */
1636  kHIDUsage_Csmr_OrderMovie = 0x85, /* One-Shot Control */
1637  kHIDUsage_Csmr_Channel = 0x86, /* Linear Control */
1638  kHIDUsage_Csmr_MediaSelection = 0x87, /* Selector */
1639  kHIDUsage_Csmr_MediaSelectComputer = 0x88, /* Selector */
1640  kHIDUsage_Csmr_MediaSelectTV = 0x89, /* Selector */
1641  kHIDUsage_Csmr_MediaSelectWWW = 0x8A, /* Selector */
1642  kHIDUsage_Csmr_MediaSelectDVD = 0x8B, /* Selector */
1643  kHIDUsage_Csmr_MediaSelectTelephone = 0x8C, /* Selector */
1644  kHIDUsage_Csmr_MediaSelectProgramGuide = 0x8D, /* Selector */
1645  kHIDUsage_Csmr_MediaSelectVideoPhone = 0x8E, /* Selector */
1646  kHIDUsage_Csmr_MediaSelectGames = 0x8F, /* Selector */
1647  kHIDUsage_Csmr_MediaSelectMessages = 0x90, /* Selector */
1648  kHIDUsage_Csmr_MediaSelectCD = 0x91, /* Selector */
1649  kHIDUsage_Csmr_MediaSelectVCR = 0x92, /* Selector */
1650  kHIDUsage_Csmr_MediaSelectTuner = 0x93, /* Selector */
1651  kHIDUsage_Csmr_Quit = 0x94, /* One-Shot Control */
1652  kHIDUsage_Csmr_Help = 0x95, /* On/Off Control */
1653  kHIDUsage_Csmr_MediaSelectTape = 0x96, /* Selector */
1654  kHIDUsage_Csmr_MediaSelectCable = 0x97, /* Selector */
1655  kHIDUsage_Csmr_MediaSelectSatellite = 0x98, /* Selector */
1656  kHIDUsage_Csmr_MediaSelectSecurity = 0x99, /* Selector */
1657  kHIDUsage_Csmr_MediaSelectHome = 0x9A, /* Selector */
1658  kHIDUsage_Csmr_MediaSelectCall = 0x9B, /* Selector */
1659  kHIDUsage_Csmr_ChannelIncrement = 0x9C, /* One-Shot Control */
1660  kHIDUsage_Csmr_ChannelDecrement = 0x9D, /* One-Shot Control */
1661  kHIDUsage_Csmr_Media = 0x9E, /* Selector */
1662  /* 0x9F Reserved */
1663  kHIDUsage_Csmr_VCRPlus = 0xA0, /* One-Shot Control */
1664  kHIDUsage_Csmr_Once = 0xA1, /* One-Shot Control */
1665  kHIDUsage_Csmr_Daily = 0xA2, /* One-Shot Control */
1666  kHIDUsage_Csmr_Weekly = 0xA3, /* One-Shot Control */
1667  kHIDUsage_Csmr_Monthly = 0xA4, /* One-Shot Control */
1668  /* 0xA5 - 0xAF Reserved */
1669  kHIDUsage_Csmr_Play = 0xB0, /* On/Off Control */
1670  kHIDUsage_Csmr_Pause = 0xB1, /* On/Off Control */
1671  kHIDUsage_Csmr_Record = 0xB2, /* On/Off Control */
1672  kHIDUsage_Csmr_FastForward = 0xB3, /* On/Off Control */
1673  kHIDUsage_Csmr_Rewind = 0xB4, /* On/Off Control */
1674  kHIDUsage_Csmr_ScanNextTrack = 0xB5, /* One-Shot Control */
1675  kHIDUsage_Csmr_ScanPreviousTrack = 0xB6, /* One-Shot Control */
1676  kHIDUsage_Csmr_Stop = 0xB7, /* One-Shot Control */
1677  kHIDUsage_Csmr_Eject = 0xB8, /* One-Shot Control */
1678  kHIDUsage_Csmr_RandomPlay = 0xB9, /* On/Off Control */
1679  kHIDUsage_Csmr_SelectDisc = 0xBA, /* Named Array */
1680  kHIDUsage_Csmr_EnterDisc = 0xBB, /* Momentary Control */
1681  kHIDUsage_Csmr_Repeat = 0xBC, /* One-Shot Control */
1682  kHIDUsage_Csmr_Tracking = 0xBD, /* Linear Control */
1683  kHIDUsage_Csmr_TrackNormal = 0xBE, /* One-Shot Control */
1684  kHIDUsage_Csmr_SlowTracking = 0xBF, /* Linear Control */
1685  kHIDUsage_Csmr_FrameForward = 0xC0, /* Re-Trigger Control */
1686  kHIDUsage_Csmr_FrameBack = 0xC1, /* Re-Trigger Control */
1687  kHIDUsage_Csmr_Mark = 0xC2, /* One-Shot Control */
1688  kHIDUsage_Csmr_ClearMark = 0xC3, /* One-Shot Control */
1689  kHIDUsage_Csmr_RepeatFromMark = 0xC4, /* On/Off Control */
1690  kHIDUsage_Csmr_ReturnToMark = 0xC5, /* One-Shot Control */
1691  kHIDUsage_Csmr_SearchMarkForward = 0xC6, /* One-Shot Control */
1692  kHIDUsage_Csmr_SearchMarkBackwards = 0xC7, /* One-Shot Control */
1693  kHIDUsage_Csmr_CounterReset = 0xC8, /* One-Shot Control */
1694  kHIDUsage_Csmr_ShowCounter = 0xC9, /* One-Shot Control */
1695  kHIDUsage_Csmr_TrackingIncrement = 0xCA, /* Re-Trigger Control */
1696  kHIDUsage_Csmr_TrackingDecrement = 0xCB, /* Re-Trigger Control */
1697  kHIDUsage_Csmr_StopOrEject = 0xCC, /* One-Shot Control */
1698  kHIDUsage_Csmr_PlayOrPause = 0xCD, /* One-Shot Control */
1699  kHIDUsage_Csmr_PlayOrSkip = 0xCE, /* One-Shot Control */
1700  /* 0xCF - 0xDF Reserved */
1701  kHIDUsage_Csmr_Volume = 0xE0, /* Linear Control */
1702  kHIDUsage_Csmr_Balance = 0xE1, /* Linear Control */
1703  kHIDUsage_Csmr_Mute = 0xE2, /* On/Off Control */
1704  kHIDUsage_Csmr_Bass = 0xE3, /* Linear Control */
1705  kHIDUsage_Csmr_Treble = 0xE4, /* Linear Control */
1706  kHIDUsage_Csmr_BassBoost = 0xE5, /* On/Off Control */
1707  kHIDUsage_Csmr_SurroundMode = 0xE6, /* One-Shot Control */
1708  kHIDUsage_Csmr_Loudness = 0xE7, /* On/Off Control */
1709  kHIDUsage_Csmr_MPX = 0xE8, /* On/Off Control */
1710  kHIDUsage_Csmr_VolumeIncrement = 0xE9, /* Re-Trigger Control */
1711  kHIDUsage_Csmr_VolumeDecrement = 0xEA, /* Re-Trigger Control */
1712  /* 0xEB - 0xEF Reserved */
1713  kHIDUsage_Csmr_Speed = 0xF0, /* Selector */
1714  kHIDUsage_Csmr_PlaybackSpeed = 0xF1, /* Named Array */
1715  kHIDUsage_Csmr_StandardPlay = 0xF2, /* Selector */
1716  kHIDUsage_Csmr_LongPlay = 0xF3, /* Selector */
1717  kHIDUsage_Csmr_ExtendedPlay = 0xF4, /* Selector */
1718  kHIDUsage_Csmr_Slow = 0xF5, /* One-Shot Control */
1719  /* 0xF6 - 0xFF Reserved */
1720  kHIDUsage_Csmr_FanEnable = 0x0100, /* On/Off Control */
1721  kHIDUsage_Csmr_FanSpeed = 0x0101, /* Linear Control */
1722  kHIDUsage_Csmr_LightEnable = 0x0102, /* On/Off Control */
1723  kHIDUsage_Csmr_LightIlluminationLevel = 0x0103, /* Linear Control */
1724  kHIDUsage_Csmr_ClimateControlEnable = 0x0104, /* On/Off Control */
1725  kHIDUsage_Csmr_RoomTemperature = 0x0105, /* Linear Control */
1726  kHIDUsage_Csmr_SecurityEnable = 0x0106, /* On/Off Control */
1727  kHIDUsage_Csmr_FireAlarm = 0x0107, /* One-Shot Control */
1728  kHIDUsage_Csmr_PoliceAlarm = 0x0108, /* One-Shot Control */
1729  /* 0x109 - 0x14F Reserved */
1730  kHIDUsage_Csmr_BalanceRight = 0x0150, /* Re-Trigger Control */
1731  kHIDUsage_Csmr_BalanceLeft = 0x0151, /* Re-Trigger Control */
1732  kHIDUsage_Csmr_BassIncrement = 0x0152, /* Re-Trigger Control */
1733  kHIDUsage_Csmr_BassDecrement = 0x0153, /* Re-Trigger Control */
1734  kHIDUsage_Csmr_TrebleIncrement = 0x0154, /* Re-Trigger Control */
1735  kHIDUsage_Csmr_TrebleDecrement = 0x0155, /* Re-Trigger Control */
1736  /* 0x156 - 0x15F Reserved */
1737  kHIDUsage_Csmr_SpeakerSystem = 0x0160, /* Logical Collection */
1738  kHIDUsage_Csmr_ChannelLeft = 0x0161, /* Logical Collection */
1739  kHIDUsage_Csmr_ChannelRight = 0x0162, /* Logical Collection */
1740  kHIDUsage_Csmr_ChannelCenter = 0x0163, /* Logical Collection */
1741  kHIDUsage_Csmr_ChannelFront = 0x0164, /* Logical Collection */
1742  kHIDUsage_Csmr_ChannelCenterFront = 0x0165, /* Logical Collection */
1743  kHIDUsage_Csmr_ChannelSide = 0x0166, /* Logical Collection */
1744  kHIDUsage_Csmr_ChannelSurround = 0x0167, /* Logical Collection */
1745  kHIDUsage_Csmr_ChannelLowFrequencyEnhancement =
1746  0x0168, /* Logical Collection */
1747  kHIDUsage_Csmr_ChannelTop = 0x0169, /* Logical Collection */
1748  kHIDUsage_Csmr_ChannelUnknown = 0x016A, /* Logical Collection */
1749  /* 0x16B - 0x16F Reserved */
1750  kHIDUsage_Csmr_SubChannel = 0x0170, /* Linear Control */
1751  kHIDUsage_Csmr_SubChannelIncrement = 0x0171, /* One-Shot Control */
1752  kHIDUsage_Csmr_SubChannelDecrement = 0x0172, /* One-Shot Control */
1753  kHIDUsage_Csmr_AlternateAudioIncrement = 0x0173, /* One-Shot Control */
1754  kHIDUsage_Csmr_AlternateAudioDecrement = 0x0174, /* One-Shot Control */
1755  /* 0x175 - 0x17F Reserved */
1756  kHIDUsage_Csmr_ApplicationLaunchButtons = 0x0180, /* Named Array */
1757  kHIDUsage_Csmr_ALLaunchButtonConfigurationTool = 0x0181, /* Selector */
1758  kHIDUsage_Csmr_ALProgrammableButtonConfiguration = 0x0182, /* Selector */
1759  kHIDUsage_Csmr_ALConsumerControlConfiguration = 0x0183, /* Selector */
1760  kHIDUsage_Csmr_ALWordProcessor = 0x0184, /* Selector */
1761  kHIDUsage_Csmr_ALTextEditor = 0x0185, /* Selector */
1762  kHIDUsage_Csmr_ALSpreadsheet = 0x0186, /* Selector */
1763  kHIDUsage_Csmr_ALGraphicsEditor = 0x0187, /* Selector */
1764  kHIDUsage_Csmr_ALPresentationApp = 0x0188, /* Selector */
1765  kHIDUsage_Csmr_ALDatabaseApp = 0x0189, /* Selector */
1766  kHIDUsage_Csmr_ALEmailReader = 0x018A, /* Selector */
1767  kHIDUsage_Csmr_ALNewsreader = 0x018B, /* Selector */
1768  kHIDUsage_Csmr_ALVoicemail = 0x018C, /* Selector */
1769  kHIDUsage_Csmr_ALContactsOrAddressBook = 0x018D, /* Selector */
1770  kHIDUsage_Csmr_ALCalendarOrSchedule = 0x018E, /* Selector */
1771  kHIDUsage_Csmr_ALTaskOrProjectManager = 0x018F, /* Selector */
1772  kHIDUsage_Csmr_ALLogOrJournalOrTimecard = 0x0190, /* Selector */
1773  kHIDUsage_Csmr_ALCheckbookOrFinance = 0x0191, /* Selector */
1774  kHIDUsage_Csmr_ALCalculator = 0x0192, /* Selector */
1775  kHIDUsage_Csmr_ALAOrVCaptureOrPlayback = 0x0193, /* Selector */
1776  kHIDUsage_Csmr_ALLocalMachineBrowser = 0x0194, /* Selector */
1777  kHIDUsage_Csmr_ALLANOrWANBrowser = 0x0195, /* Selector */
1778  kHIDUsage_Csmr_ALInternetBrowser = 0x0196, /* Selector */
1779  kHIDUsage_Csmr_ALRemoteNetworkingOrISPConnect = 0x0197, /* Selector */
1780  kHIDUsage_Csmr_ALNetworkConference = 0x0198, /* Selector */
1781  kHIDUsage_Csmr_ALNetworkChat = 0x0199, /* Selector */
1782  kHIDUsage_Csmr_ALTelephonyOrDialer = 0x019A, /* Selector */
1783  kHIDUsage_Csmr_ALLogon = 0x019B, /* Selector */
1784  kHIDUsage_Csmr_ALLogoff = 0x019C, /* Selector */
1785  kHIDUsage_Csmr_ALLogonOrLogoff = 0x019D, /* Selector */
1786  kHIDUsage_Csmr_ALTerminalLockOrScreensaver = 0x019E, /* Selector */
1787  kHIDUsage_Csmr_ALControlPanel = 0x019F, /* Selector */
1788  kHIDUsage_Csmr_ALCommandLineProcessorOrRun = 0x01A0, /* Selector */
1789  kHIDUsage_Csmr_ALProcessOrTaskManager = 0x01A1, /* Selector */
1790  kHIDUsage_Csmr_AL = 0x01A2, /* Selector */
1791  kHIDUsage_Csmr_ALNextTaskOrApplication = 0x0143, /* Selector */
1792  kHIDUsage_Csmr_ALPreviousTaskOrApplication = 0x01A4, /* Selector */
1793  kHIDUsage_Csmr_ALPreemptiveHaltTaskOrApplication = 0x01A5, /* Selector */
1794  /* 0x1A6 - 0x1FF Reserved */
1795  kHIDUsage_Csmr_GenericGUIApplicationControls = 0x0200, /* Named Array */
1796  kHIDUsage_Csmr_ACNew = 0x0201, /* Selector */
1797  kHIDUsage_Csmr_ACOpen = 0x0202, /* Selector */
1798  kHIDUsage_Csmr_ACClose = 0x0203, /* Selector */
1799  kHIDUsage_Csmr_ACExit = 0x0204, /* Selector */
1800  kHIDUsage_Csmr_ACMaximize = 0x0205, /* Selector */
1801  kHIDUsage_Csmr_ACMinimize = 0x0206, /* Selector */
1802  kHIDUsage_Csmr_ACSave = 0x0207, /* Selector */
1803  kHIDUsage_Csmr_ACPrint = 0x0208, /* Selector */
1804  kHIDUsage_Csmr_ACProperties = 0x0209, /* Selector */
1805  kHIDUsage_Csmr_ACUndo = 0x021A, /* Selector */
1806  kHIDUsage_Csmr_ACCopy = 0x021B, /* Selector */
1807  kHIDUsage_Csmr_ACCut = 0x021C, /* Selector */
1808  kHIDUsage_Csmr_ACPaste = 0x021D, /* Selector */
1809  kHIDUsage_Csmr_AC = 0x021E, /* Selector */
1810  kHIDUsage_Csmr_ACFind = 0x021F, /* Selector */
1811  kHIDUsage_Csmr_ACFindandReplace = 0x0220, /* Selector */
1812  kHIDUsage_Csmr_ACSearch = 0x0221, /* Selector */
1813  kHIDUsage_Csmr_ACGoTo = 0x0222, /* Selector */
1814  kHIDUsage_Csmr_ACHome = 0x0223, /* Selector */
1815  kHIDUsage_Csmr_ACBack = 0x0224, /* Selector */
1816  kHIDUsage_Csmr_ACForward = 0x0225, /* Selector */
1817  kHIDUsage_Csmr_ACStop = 0x0226, /* Selector */
1818  kHIDUsage_Csmr_ACRefresh = 0x0227, /* Selector */
1819  kHIDUsage_Csmr_ACPreviousLink = 0x0228, /* Selector */
1820  kHIDUsage_Csmr_ACNextLink = 0x0229, /* Selector */
1821  kHIDUsage_Csmr_ACBookmarks = 0x022A, /* Selector */
1822  kHIDUsage_Csmr_ACHistory = 0x022B, /* Selector */
1823  kHIDUsage_Csmr_ACSubscriptions = 0x022C, /* Selector */
1824  kHIDUsage_Csmr_ACZoomIn = 0x022D, /* Selector */
1825  kHIDUsage_Csmr_ACZoomOut = 0x022E, /* Selector */
1826  kHIDUsage_Csmr_ACZoom = 0x022F, /* Selector */
1827  kHIDUsage_Csmr_ACFullScreenView = 0x0230, /* Selector */
1828  kHIDUsage_Csmr_ACNormalView = 0x0231, /* Selector */
1829  kHIDUsage_Csmr_ACViewToggle = 0x0232, /* Selector */
1830  kHIDUsage_Csmr_ACScrollUp = 0x0233, /* Selector */
1831  kHIDUsage_Csmr_ACScrollDown = 0x0234, /* Selector */
1832  kHIDUsage_Csmr_ACScroll = 0x0235, /* Selector */
1833  kHIDUsage_Csmr_ACPanLeft = 0x0236, /* Selector */
1834  kHIDUsage_Csmr_ACPanRight = 0x0237, /* Selector */
1835  kHIDUsage_Csmr_ACPan = 0x0238, /* Selector */
1836  kHIDUsage_Csmr_ACNewWindow = 0x0239, /* Selector */
1837  kHIDUsage_Csmr_ACTileHorizontally = 0x023A, /* Selector */
1838  kHIDUsage_Csmr_ACTileVertically = 0x023B, /* Selector */
1839  kHIDUsage_Csmr_ACFormat = 0x023C, /* Selector */
1840  /* 0x23D - 0xFFFF Reserved */
1841  kHIDUsage_Csmr_Reserved = 0xFFFF
1842  };
1843 
1844  /* Digitizer Page (0x0D) */
1845  /* This section provides detailed descriptions of the usages employed by
1846  * Digitizer Devices. */
1847  enum
1848  {
1849  kHIDUsage_Dig_Digitizer = 0x01, /* Application Collection */
1850  kHIDUsage_Dig_Pen = 0x02, /* Application Collection */
1851  kHIDUsage_Dig_LightPen = 0x03, /* Application Collection */
1852  kHIDUsage_Dig_TouchScreen = 0x04, /* Application Collection */
1853  kHIDUsage_Dig_TouchPad = 0x05, /* Application Collection */
1854  kHIDUsage_Dig_WhiteBoard = 0x06, /* Application Collection */
1855  kHIDUsage_Dig_CoordinateMeasuringMachine = 0x07, /* Application Collection */
1856  kHIDUsage_Dig_3DDigitizer = 0x08, /* Application Collection */
1857  kHIDUsage_Dig_StereoPlotter = 0x09, /* Application Collection */
1858  kHIDUsage_Dig_ArticulatedArm = 0x0A, /* Application Collection */
1859  kHIDUsage_Dig_Armature = 0x0B, /* Application Collection */
1860  kHIDUsage_Dig_MultiplePointDigitizer = 0x0C, /* Application Collection */
1861  kHIDUsage_Dig_FreeSpaceWand = 0x0D, /* Application Collection */
1862  /* 0x0E - 0x1F Reserved */
1863  kHIDUsage_Dig_Stylus = 0x20, /* Logical Collection */
1864  kHIDUsage_Dig_Puck = 0x21, /* Logical Collection */
1865  kHIDUsage_Dig_Finger = 0x22, /* Logical Collection */
1866  /* 0x23 - 0x2F Reserved */
1867  kHIDUsage_Dig_TipPressure = 0x30, /* Dynamic Value */
1868  kHIDUsage_Dig_BarrelPressure = 0x31, /* Dynamic Value */
1869  kHIDUsage_Dig_InRange = 0x32, /* Momentary Control */
1870  kHIDUsage_Dig_Touch = 0x33, /* Momentary Control */
1871  kHIDUsage_Dig_Untouch = 0x34, /* One-Shot Control */
1872  kHIDUsage_Dig_Tap = 0x35, /* One-Shot Control */
1873  kHIDUsage_Dig_Quality = 0x36, /* Dynamic Value */
1874  kHIDUsage_Dig_DataValid = 0x37, /* Momentary Control */
1875  kHIDUsage_Dig_TransducerIndex = 0x38, /* Dynamic Value */
1876  kHIDUsage_Dig_TabletFunctionKeys = 0x39, /* Logical Collection */
1877  kHIDUsage_Dig_ProgramChangeKeys = 0x3A, /* Logical Collection */
1878  kHIDUsage_Dig_BatteryStrength = 0x3B, /* Dynamic Value */
1879  kHIDUsage_Dig_Invert = 0x3C, /* Momentary Control */
1880  kHIDUsage_Dig_XTilt = 0x3D, /* Dynamic Value */
1881  kHIDUsage_Dig_YTilt = 0x3E, /* Dynamic Value */
1882  kHIDUsage_Dig_Azimuth = 0x3F, /* Dynamic Value */
1883  kHIDUsage_Dig_Altitude = 0x40, /* Dynamic Value */
1884  kHIDUsage_Dig_Twist = 0x41, /* Dynamic Value */
1885  kHIDUsage_Dig_TipSwitch = 0x42, /* Momentary Control */
1886  kHIDUsage_Dig_SecondaryTipSwitch = 0x43, /* Momentary Control */
1887  kHIDUsage_Dig_BarrelSwitch = 0x44, /* Momentary Control */
1888  kHIDUsage_Dig_Eraser = 0x45, /* Momentary Control */
1889  kHIDUsage_Dig_TabletPick = 0x46, /* Momentary Control */
1890  /* 0x47 - 0xFFFF Reserved */
1891  kHIDUsage_Dig_Reserved = 0xFFFF
1892  };
1893 
1894  /* AlphanumericDisplay Page (0x14) */
1895  /* The Alphanumeric Display page is intended for use by simple alphanumeric
1896  * displays that are used on consumer devices. */
1897  enum
1898  {
1899  kHIDUsage_AD_AlphanumericDisplay = 0x01, /* Application Collection */
1900  /* 0x02 - 0x1F Reserved */
1901  kHIDUsage_AD_DisplayAttributesReport = 0x20, /* Logical Collection */
1902  kHIDUsage_AD_ASCIICharacterSet = 0x21, /* Static Flag */
1903  kHIDUsage_AD_DataReadBack = 0x22, /* Static Flag */
1904  kHIDUsage_AD_FontReadBack = 0x23, /* Static Flag */
1905  kHIDUsage_AD_DisplayControlReport = 0x24, /* Logical Collection */
1906  kHIDUsage_AD_ClearDisplay = 0x25, /* Dynamic Flag */
1907  kHIDUsage_AD_DisplayEnable = 0x26, /* Dynamic Flag */
1908  kHIDUsage_AD_ScreenSaverDelay = 0x27, /* Static Value */
1909  kHIDUsage_AD_ScreenSaverEnable = 0x28, /* Dynamic Flag */
1910  kHIDUsage_AD_VerticalScroll = 0x29, /* Static Flag */
1911  kHIDUsage_AD_HorizontalScroll = 0x2A, /* Static Flag */
1912  kHIDUsage_AD_CharacterReport = 0x2B, /* Logical Collection */
1913  kHIDUsage_AD_DisplayData = 0x2C, /* Dynamic Value */
1914  kHIDUsage_AD_DisplayStatus = 0x2D, /* Logical Collection */
1915  kHIDUsage_AD_StatNotReady = 0x2E, /* Selector */
1916  kHIDUsage_AD_StatReady = 0x2F, /* Selector */
1917  kHIDUsage_AD_ErrNotaloadablecharacter = 0x30, /* Selector */
1918  kHIDUsage_AD_ErrFontdatacannotberead = 0x31, /* Selector */
1919  kHIDUsage_AD_CursorPositionReport = 0x32, /* Logical Collection */
1920  kHIDUsage_AD_Row = 0x33, /* Dynamic Value */
1921  kHIDUsage_AD_Column = 0x34, /* Dynamic Value */
1922  kHIDUsage_AD_Rows = 0x35, /* Static Value */
1923  kHIDUsage_AD_Columns = 0x36, /* Static Value */
1924  kHIDUsage_AD_CursorPixelPositioning = 0x37, /* Static Flag */
1925  kHIDUsage_AD_CursorMode = 0x38, /* Dynamic Flag */
1926  kHIDUsage_AD_CursorEnable = 0x39, /* Dynamic Flag */
1927  kHIDUsage_AD_CursorBlink = 0x3A, /* Dynamic Flag */
1928  kHIDUsage_AD_FontReport = 0x3B, /* Logical Collection */
1929  kHIDUsage_AD_FontData = 0x3C, /* Buffered Byte */
1930  kHIDUsage_AD_CharacterWidth = 0x3D, /* Static Value */
1931  kHIDUsage_AD_CharacterHeight = 0x3E, /* Static Value */
1932  kHIDUsage_AD_CharacterSpacingHorizontal = 0x3F, /* Static Value */
1933  kHIDUsage_AD_CharacterSpacingVertical = 0x40, /* Static Value */
1934  kHIDUsage_AD_UnicodeCharacterSet = 0x41, /* Static Flag */
1935  /* 0x42 - 0xFFFF Reserved */
1936  kHIDUsage_AD_Reserved = 0xFFFF
1937  };
1938 
1939 #if PRAGMA_STRUCT_ALIGN
1940 #pragma options align = reset
1941 #elif PRAGMA_STRUCT_PACKPUSH
1942 #pragma pack(pop)
1943 #elif PRAGMA_STRUCT_PACK
1944 #pragma pack()
1945 #endif
1946 
1947 #ifdef PRAGMA_IMPORT_OFF
1948 #pragma import off
1949 #elif PRAGMA_IMPORT
1950 #pragma import reset
1951 #endif
1952 
1953 #ifdef __cplusplus
1954 }
1955 #endif
1956 
1957 #endif /* __HID__ */
OSStatus HIDGetNextButtonInfo(HIDReportType reportType, HIDUsage usagePage, HIDUsage usage, UInt32 *collection, UInt8 *reportID, HIDPreparsedDataRef preparsedDataRef)
OSStatus HIDOpenReportDescriptor(void *hidReportDescriptor, ByteCount descriptorLength, HIDPreparsedDataRef *preparsedDataRef, UInt32 flags)
OSStatus HIDUsageListDifference(HIDUsage *previousUsageList, HIDUsage *currentUsageList, HIDUsage *breakUsageList, HIDUsage *makeUsageList, UInt32 usageListsSize)
OSStatus HIDInitReport(HIDReportType reportType, UInt8 reportID, HIDPreparsedDataRef preparsedDataRef, void *report, ByteCount reportLength)
OSStatus HIDGetButtons(HIDReportType reportType, UInt32 collection, HIDUsageAndPagePtr usageList, UInt32 *usageListSize, HIDPreparsedDataRef preparsedDataRef, void *report, ByteCount reportLength)
OSStatus HIDGetScaledUsageValue(HIDReportType reportType, HIDUsage usagePage, UInt32 collection, HIDUsage usage, SInt32 *usageValue, HIDPreparsedDataRef preparsedDataRef, void *report, ByteCount reportLength)
OSStatus HIDGetButtonCaps(HIDReportType reportType, HIDButtonCapsPtr buttonCaps, UInt32 *buttonCapsSize, HIDPreparsedDataRef preparsedDataRef)
OSStatus HIDGetButtonsOnPage(HIDReportType reportType, HIDUsage usagePage, UInt32 collection, HIDUsage *usageList, UInt32 *usageListSize, HIDPreparsedDataRef preparsedDataRef, void *report, ByteCount reportLength)
OSStatus HIDGetNextUsageValueInfo(HIDReportType reportType, HIDUsage usagePage, HIDUsage usage, UInt32 *collection, UInt8 *reportID, HIDPreparsedDataRef preparsedDataRef)
OSStatus HIDGetUsageValue(HIDReportType reportType, HIDUsage usagePage, UInt32 collection, HIDUsage usage, SInt32 *usageValue, HIDPreparsedDataRef preparsedDataRef, void *report, ByteCount reportLength)
OSStatus HIDGetUsageValueArray(HIDReportType reportType, HIDUsage usagePage, UInt32 collection, HIDUsage usage, Byte *usageValueBuffer, ByteCount usageValueBufferSize, HIDPreparsedDataRef preparsedDataRef, void *report, ByteCount reportLength)
OSStatus HIDGetSpecificButtonCapabilities(HIDReportType reportType, HIDUsage usagePage, UInt32 collection, HIDUsage usage, HIDButtonCapabilitiesPtr buttonCaps, UInt32 *buttonCapsSize, HIDPreparsedDataRef preparsedDataRef)
OSStatus HIDSetButtons(HIDReportType reportType, HIDUsage usagePage, UInt32 collection, HIDUsage *usageList, UInt32 *usageListSize, HIDPreparsedDataRef preparsedDataRef, void *report, ByteCount reportLength)
OSStatus HIDGetSpecificValueCapabilities(HIDReportType reportType, HIDUsage usagePage, UInt32 collection, HIDUsage usage, HIDValueCapabilitiesPtr valueCaps, UInt32 *valueCapsSize, HIDPreparsedDataRef preparsedDataRef)
OSStatus HIDCloseReportDescriptor(HIDPreparsedDataRef preparsedDataRef)
OSStatus HIDGetSpecificButtonCaps(HIDReportType reportType, HIDUsage usagePage, UInt32 collection, HIDUsage usage, HIDButtonCapsPtr buttonCaps, UInt32 *buttonCapsSize, HIDPreparsedDataRef preparsedDataRef)
OSStatus HIDSetUsageValue(HIDReportType reportType, HIDUsage usagePage, UInt32 collection, HIDUsage usage, SInt32 usageValue, HIDPreparsedDataRef preparsedDataRef, void *report, ByteCount reportLength)
OSStatus HIDGetCaps(HIDPreparsedDataRef preparsedDataRef, HIDCapsPtr capabilities)
OSStatus HIDSetScaledUsageValue(HIDReportType reportType, HIDUsage usagePage, UInt32 collection, HIDUsage usage, SInt32 usageValue, HIDPreparsedDataRef preparsedDataRef, void *report, ByteCount reportLength)
OSStatus HIDGetButtonCapabilities(HIDReportType reportType, HIDButtonCapabilitiesPtr buttonCaps, UInt32 *buttonCapsSize, HIDPreparsedDataRef preparsedDataRef)
typedef CALLBACK_API_C(OSStatus, HIDInstallReportHandlerProcPtr)(HIDDeviceConnectionRef inConnectionRef
OSStatus HIDGetCollectionNodes(HIDCollectionNodePtr collectionNodes, UInt32 *collectionNodesSize, HIDPreparsedDataRef preparsedDataRef)
OSStatus HIDSetUsageValueArray(HIDReportType reportType, HIDUsage usagePage, UInt32 collection, HIDUsage usage, Byte *usageValueBuffer, ByteCount usageValueBufferLength, HIDPreparsedDataRef preparsedDataRef, void *report, ByteCount reportLength)
UInt32 HIDGetHIDLibVersion(void)
OSStatus HIDGetValueCapabilities(HIDReportType reportType, HIDValueCapabilitiesPtr valueCaps, UInt32 *valueCapsSize, HIDPreparsedDataRef preparsedDataRef)
OSStatus HIDGetReportLength(HIDReportType reportType, UInt8 reportID, ByteCount *reportLength, HIDPreparsedDataRef preparsedDataRef)
OSStatus HIDGetCapabilities(HIDPreparsedDataRef preparsedDataRef, HIDCapabilitiesPtr capabilities)
UInt32 HIDMaxUsageListLength(HIDReportType reportType, HIDUsage usagePage, HIDPreparsedDataRef preparsedDataRef)
OSStatus HIDGetValueCaps(HIDReportType reportType, HIDValueCapsPtr valueCaps, UInt32 *valueCapsSize, HIDPreparsedDataRef preparsedDataRef)
OSStatus HIDGetSpecificValueCaps(HIDReportType reportType, HIDUsage usagePage, UInt32 collection, HIDUsage usage, HIDValueCapsPtr valueCaps, UInt32 *valueCapsSize, HIDPreparsedDataRef preparsedDataRef)
OSStatus HIDSetButton(HIDReportType reportType, HIDUsage usagePage, UInt32 collection, HIDUsage usage, HIDPreparsedDataRef preparsedDataRef, void *report, ByteCount reportLength)
OSErr codes.
Basic Macintosh data types.
unsigned char Boolean
Definition: MacTypes.h:318
Definition: HID.h:173
Definition: HID.h:136
Definition: HID.h:108
Definition: HID.h:91
Definition: HID.h:125
Definition: HID.h:848
Definition: HID.h:84
Definition: HID.h:262
Definition: HID.h:216