Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

279 lines
11 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. HIDUSAGE.H
  5. Abstract:
  6. Public Definitions of HID USAGES.
  7. Environment:
  8. Kernel & user mode
  9. @@BEGIN_DDKSPLIT
  10. Revision History:
  11. Aug-1996 : created by Kenneth D. Ray
  12. Jun-1997 : updated by Robert Ingman to reflect final HID 1.0 spec
  13. and HID Usages Table 0.9 spec.
  14. @@END_DDKSPLIT
  15. --*/
  16. #ifndef __HIDUSAGE_H__
  17. #define __HIDUSAGE_H__
  18. //
  19. // Usage Pages
  20. //
  21. typedef USHORT USAGE, *PUSAGE;
  22. #define HID_USAGE_PAGE_UNDEFINED ((USAGE) 0x00)
  23. #define HID_USAGE_PAGE_GENERIC ((USAGE) 0x01)
  24. #define HID_USAGE_PAGE_SIMULATION ((USAGE) 0x02)
  25. #define HID_USAGE_PAGE_VR ((USAGE) 0x03)
  26. #define HID_USAGE_PAGE_SPORT ((USAGE) 0x04)
  27. #define HID_USAGE_PAGE_GAME ((USAGE) 0x05)
  28. #define HID_USAGE_PAGE_KEYBOARD ((USAGE) 0x07)
  29. #define HID_USAGE_PAGE_LED ((USAGE) 0x08)
  30. #define HID_USAGE_PAGE_BUTTON ((USAGE) 0x09)
  31. #define HID_USAGE_PAGE_ORDINAL ((USAGE) 0x0A)
  32. #define HID_USAGE_PAGE_TELEPHONY ((USAGE) 0x0B)
  33. #define HID_USAGE_PAGE_CONSUMER ((USAGE) 0x0C)
  34. #define HID_USAGE_PAGE_DIGITIZER ((USAGE) 0x0D)
  35. #define HID_USAGE_PAGE_UNICODE ((USAGE) 0x10)
  36. #define HID_USAGE_PAGE_ALPHANUMERIC ((USAGE) 0x14)
  37. //
  38. // Usages from Generic Desktop Page (0x01)
  39. //
  40. #define HID_USAGE_GENERIC_POINTER ((USAGE) 0x01)
  41. #define HID_USAGE_GENERIC_MOUSE ((USAGE) 0x02)
  42. #define HID_USAGE_GENERIC_JOYSTICK ((USAGE) 0x04)
  43. #define HID_USAGE_GENERIC_GAMEPAD ((USAGE) 0x05)
  44. #define HID_USAGE_GENERIC_KEYBOARD ((USAGE) 0x06)
  45. #define HID_USAGE_GENERIC_KEYPAD ((USAGE) 0x07)
  46. #define HID_USAGE_GENERIC_SYSTEM_CTL ((USAGE) 0x80)
  47. #define HID_USAGE_GENERIC_X ((USAGE) 0x30)
  48. #define HID_USAGE_GENERIC_Y ((USAGE) 0x31)
  49. #define HID_USAGE_GENERIC_Z ((USAGE) 0x32)
  50. #define HID_USAGE_GENERIC_RX ((USAGE) 0x33)
  51. #define HID_USAGE_GENERIC_RY ((USAGE) 0x34)
  52. #define HID_USAGE_GENERIC_RZ ((USAGE) 0x35)
  53. #define HID_USAGE_GENERIC_SLIDER ((USAGE) 0x36)
  54. #define HID_USAGE_GENERIC_DIAL ((USAGE) 0x37)
  55. #define HID_USAGE_GENERIC_WHEEL ((USAGE) 0x38)
  56. #define HID_USAGE_GENERIC_HATSWITCH ((USAGE) 0x39)
  57. #define HID_USAGE_GENERIC_COUNTED_BUFFER ((USAGE) 0x3A)
  58. #define HID_USAGE_GENERIC_BYTE_COUNT ((USAGE) 0x3B)
  59. #define HID_USAGE_GENERIC_MOTION_WAKEUP ((USAGE) 0x3C)
  60. #define HID_USAGE_GENERIC_VX ((USAGE) 0x40)
  61. #define HID_USAGE_GENERIC_VY ((USAGE) 0x41)
  62. #define HID_USAGE_GENERIC_VZ ((USAGE) 0x42)
  63. #define HID_USAGE_GENERIC_VBRX ((USAGE) 0x43)
  64. #define HID_USAGE_GENERIC_VBRY ((USAGE) 0x44)
  65. #define HID_USAGE_GENERIC_VBRZ ((USAGE) 0x45)
  66. #define HID_USAGE_GENERIC_VNO ((USAGE) 0x46)
  67. #define HID_USAGE_GENERIC_SYSCTL_POWER ((USAGE) 0x81)
  68. #define HID_USAGE_GENERIC_SYSCTL_SLEEP ((USAGE) 0x82)
  69. #define HID_USAGE_GENERIC_SYSCTL_WAKE ((USAGE) 0x83)
  70. #define HID_USAGE_GENERIC_SYSCTL_CONTEXT_MENU ((USAGE) 0x84)
  71. #define HID_USAGE_GENERIC_SYSCTL_MAIN_MENU ((USAGE) 0x85)
  72. #define HID_USAGE_GENERIC_SYSCTL_APP_MENU ((USAGE) 0x86)
  73. #define HID_USAGE_GENERIC_SYSCTL_HELP_MENU ((USAGE) 0x87)
  74. #define HID_USAGE_GENERIC_SYSCTL_MENU_EXIT ((USAGE) 0x88)
  75. #define HID_USAGE_GENERIC_SYSCTL_MENU_SELECT ((USAGE) 0x89)
  76. #define HID_USAGE_GENERIC_SYSCTL_MENU_RIGHT ((USAGE) 0x8A)
  77. #define HID_USAGE_GENERIC_SYSCTL_MENU_LEFT ((USAGE) 0x8B)
  78. #define HID_USAGE_GENERIC_SYSCTL_MENU_UP ((USAGE) 0x8C)
  79. #define HID_USAGE_GENERIC_SYSCTL_MENU_DOWN ((USAGE) 0x8D)
  80. //
  81. // Usages from Simulation Controls Page (0x02)
  82. //
  83. #define HID_USAGE_SIMULATION_RUDDER ((USAGE) 0xBA)
  84. #define HID_USAGE_SIMULATION_THROTTLE ((USAGE) 0xBB)
  85. //
  86. // Virtual Reality Controls Page (0x03)
  87. //
  88. //
  89. // Sport Controls Page (0x04)
  90. //
  91. //
  92. // Game Controls Page (0x05)
  93. //
  94. //
  95. // Keyboard/Keypad Page (0x07)
  96. //
  97. // Error "keys"
  98. #define HID_USAGE_KEYBOARD_NOEVENT ((USAGE) 0x00)
  99. #define HID_USAGE_KEYBOARD_ROLLOVER ((USAGE) 0x01)
  100. #define HID_USAGE_KEYBOARD_POSTFAIL ((USAGE) 0x02)
  101. #define HID_USAGE_KEYBOARD_UNDEFINED ((USAGE) 0x03)
  102. // Letters
  103. #define HID_USAGE_KEYBOARD_aA ((USAGE) 0x04)
  104. #define HID_USAGE_KEYBOARD_zZ ((USAGE) 0x1D)
  105. // Numbers
  106. #define HID_USAGE_KEYBOARD_ONE ((USAGE) 0x1E)
  107. #define HID_USAGE_KEYBOARD_ZERO ((USAGE) 0x27)
  108. // Modifier Keys
  109. #define HID_USAGE_KEYBOARD_LCTRL ((USAGE) 0xE0)
  110. #define HID_USAGE_KEYBOARD_LSHFT ((USAGE) 0xE1)
  111. #define HID_USAGE_KEYBOARD_LALT ((USAGE) 0xE2)
  112. #define HID_USAGE_KEYBOARD_LGUI ((USAGE) 0xE3)
  113. #define HID_USAGE_KEYBOARD_RCTRL ((USAGE) 0xE4)
  114. #define HID_USAGE_KEYBOARD_RSHFT ((USAGE) 0xE5)
  115. #define HID_USAGE_KEYBOARD_RALT ((USAGE) 0xE6)
  116. #define HID_USAGE_KEYBOARD_RGUI ((USAGE) 0xE7)
  117. #define HID_USAGE_KEYBOARD_SCROLL_LOCK ((USAGE) 0x47)
  118. #define HID_USAGE_KEYBOARD_NUM_LOCK ((USAGE) 0x53)
  119. #define HID_USAGE_KEYBOARD_CAPS_LOCK ((USAGE) 0x39)
  120. // Funtion keys
  121. #define HID_USAGE_KEYBOARD_F1 ((USAGE) 0x3A)
  122. #define HID_USAGE_KEYBOARD_F12 ((USAGE) 0x45)
  123. #define HID_USAGE_KEYBOARD_RETURN ((USAGE) 0x28)
  124. #define HID_USAGE_KEYBOARD_ESCAPE ((USAGE) 0x29)
  125. #define HID_USAGE_KEYBOARD_DELETE ((USAGE) 0x2A)
  126. #define HID_USAGE_KEYBOARD_PRINT_SCREEN ((USAGE) 0x46)
  127. // and hundreds more...
  128. //
  129. // LED Page (0x08)
  130. //
  131. #define HID_USAGE_LED_NUM_LOCK ((USAGE) 0x01)
  132. #define HID_USAGE_LED_CAPS_LOCK ((USAGE) 0x02)
  133. #define HID_USAGE_LED_SCROLL_LOCK ((USAGE) 0x03)
  134. #define HID_USAGE_LED_COMPOSE ((USAGE) 0x04)
  135. #define HID_USAGE_LED_KANA ((USAGE) 0x05)
  136. #define HID_USAGE_LED_POWER ((USAGE) 0x06)
  137. #define HID_USAGE_LED_SHIFT ((USAGE) 0x07)
  138. #define HID_USAGE_LED_DO_NOT_DISTURB ((USAGE) 0x08)
  139. #define HID_USAGE_LED_MUTE ((USAGE) 0x09)
  140. #define HID_USAGE_LED_TONE_ENABLE ((USAGE) 0x0A)
  141. #define HID_USAGE_LED_HIGH_CUT_FILTER ((USAGE) 0x0B)
  142. #define HID_USAGE_LED_LOW_CUT_FILTER ((USAGE) 0x0C)
  143. #define HID_USAGE_LED_EQUALIZER_ENABLE ((USAGE) 0x0D)
  144. #define HID_USAGE_LED_SOUND_FIELD_ON ((USAGE) 0x0E)
  145. #define HID_USAGE_LED_SURROUND_FIELD_ON ((USAGE) 0x0F)
  146. #define HID_USAGE_LED_REPEAT ((USAGE) 0x10)
  147. #define HID_USAGE_LED_STEREO ((USAGE) 0x11)
  148. #define HID_USAGE_LED_SAMPLING_RATE_DETECT ((USAGE) 0x12)
  149. #define HID_USAGE_LED_SPINNING ((USAGE) 0x13)
  150. #define HID_USAGE_LED_CAV ((USAGE) 0x14)
  151. #define HID_USAGE_LED_CLV ((USAGE) 0x15)
  152. #define HID_USAGE_LED_RECORDING_FORMAT_DET ((USAGE) 0x16)
  153. #define HID_USAGE_LED_OFF_HOOK ((USAGE) 0x17)
  154. #define HID_USAGE_LED_RING ((USAGE) 0x18)
  155. #define HID_USAGE_LED_MESSAGE_WAITING ((USAGE) 0x19)
  156. #define HID_USAGE_LED_DATA_MODE ((USAGE) 0x1A)
  157. #define HID_USAGE_LED_BATTERY_OPERATION ((USAGE) 0x1B)
  158. #define HID_USAGE_LED_BATTERY_OK ((USAGE) 0x1C)
  159. #define HID_USAGE_LED_BATTERY_LOW ((USAGE) 0x1D)
  160. #define HID_USAGE_LED_SPEAKER ((USAGE) 0x1E)
  161. #define HID_USAGE_LED_HEAD_SET ((USAGE) 0x1F)
  162. #define HID_USAGE_LED_HOLD ((USAGE) 0x20)
  163. #define HID_USAGE_LED_MICROPHONE ((USAGE) 0x21)
  164. #define HID_USAGE_LED_COVERAGE ((USAGE) 0x22)
  165. #define HID_USAGE_LED_NIGHT_MODE ((USAGE) 0x23)
  166. #define HID_USAGE_LED_SEND_CALLS ((USAGE) 0x24)
  167. #define HID_USAGE_LED_CALL_PICKUP ((USAGE) 0x25)
  168. #define HID_USAGE_LED_CONFERENCE ((USAGE) 0x26)
  169. #define HID_USAGE_LED_STAND_BY ((USAGE) 0x27)
  170. #define HID_USAGE_LED_CAMERA_ON ((USAGE) 0x28)
  171. #define HID_USAGE_LED_CAMERA_OFF ((USAGE) 0x29)
  172. #define HID_USAGE_LED_ON_LINE ((USAGE) 0x2A)
  173. #define HID_USAGE_LED_OFF_LINE ((USAGE) 0x2B)
  174. #define HID_USAGE_LED_BUSY ((USAGE) 0x2C)
  175. #define HID_USAGE_LED_READY ((USAGE) 0x2D)
  176. #define HID_USAGE_LED_PAPER_OUT ((USAGE) 0x2E)
  177. #define HID_USAGE_LED_PAPER_JAM ((USAGE) 0x2F)
  178. #define HID_USAGE_LED_REMOTE ((USAGE) 0x30)
  179. #define HID_USAGE_LED_FORWARD ((USAGE) 0x31)
  180. #define HID_USAGE_LED_REVERSE ((USAGE) 0x32)
  181. #define HID_USAGE_LED_STOP ((USAGE) 0x33)
  182. #define HID_USAGE_LED_REWIND ((USAGE) 0x34)
  183. #define HID_USAGE_LED_FAST_FORWARD ((USAGE) 0x35)
  184. #define HID_USAGE_LED_PLAY ((USAGE) 0x36)
  185. #define HID_USAGE_LED_PAUSE ((USAGE) 0x37)
  186. #define HID_USAGE_LED_RECORD ((USAGE) 0x38)
  187. #define HID_USAGE_LED_ERROR ((USAGE) 0x39)
  188. #define HID_USAGE_LED_SELECTED_INDICATOR ((USAGE) 0x3A)
  189. #define HID_USAGE_LED_IN_USE_INDICATOR ((USAGE) 0x3B)
  190. #define HID_USAGE_LED_MULTI_MODE_INDICATOR ((USAGE) 0x3C)
  191. #define HID_USAGE_LED_INDICATOR_ON ((USAGE) 0x3D)
  192. #define HID_USAGE_LED_INDICATOR_FLASH ((USAGE) 0x3E)
  193. #define HID_USAGE_LED_INDICATOR_SLOW_BLINK ((USAGE) 0x3F)
  194. #define HID_USAGE_LED_INDICATOR_FAST_BLINK ((USAGE) 0x40)
  195. #define HID_USAGE_LED_INDICATOR_OFF ((USAGE) 0x41)
  196. #define HID_USAGE_LED_FLASH_ON_TIME ((USAGE) 0x42)
  197. #define HID_USAGE_LED_SLOW_BLINK_ON_TIME ((USAGE) 0x43)
  198. #define HID_USAGE_LED_SLOW_BLINK_OFF_TIME ((USAGE) 0x44)
  199. #define HID_USAGE_LED_FAST_BLINK_ON_TIME ((USAGE) 0x45)
  200. #define HID_USAGE_LED_FAST_BLINK_OFF_TIME ((USAGE) 0x46)
  201. #define HID_USAGE_LED_INDICATOR_COLOR ((USAGE) 0x47)
  202. #define HID_USAGE_LED_RED ((USAGE) 0x48)
  203. #define HID_USAGE_LED_GREEN ((USAGE) 0x49)
  204. #define HID_USAGE_LED_AMBER ((USAGE) 0x4A)
  205. #define HID_USAGE_LED_GENERIC_INDICATOR ((USAGE) 0x4B)
  206. //
  207. // Button Page (0x09)
  208. //
  209. // There is no need to label these usages.
  210. //
  211. //
  212. // Ordinal Page (0x0A)
  213. //
  214. // There is no need to label these usages.
  215. //
  216. //
  217. // Telephony Device Page (0x0B)
  218. //
  219. #define HID_USAGE_TELEPHONY_PHONE ((USAGE) 0x01)
  220. #define HID_USAGE_TELEPHONY_ANSWERING_MACHINE ((USAGE) 0x02)
  221. #define HID_USAGE_TELEPHONY_MESSAGE_CONTROLS ((USAGE) 0x03)
  222. #define HID_USAGE_TELEPHONY_HANDSET ((USAGE) 0x04)
  223. #define HID_USAGE_TELEPHONY_HEADSET ((USAGE) 0x05)
  224. #define HID_USAGE_TELEPHONY_KEYPAD ((USAGE) 0x06)
  225. #define HID_USAGE_TELEPHONY_PROGRAMMABLE_BUTTON ((USAGE) 0x07)
  226. //
  227. // and others...
  228. //
  229. #define HID_USAGE_CONSUMERCTRL ((USAGE)0x01)
  230. #define HID_USAGE_DIGITIZER_PEN ((USAGE)0x02)
  231. #define HID_USAGE_DIGITIZER_IN_RANGE ((USAGE)0x32)
  232. #define HID_USAGE_DIGITIZER_TIP_SWITCH ((USAGE)0x42)
  233. #define HID_USAGE_DIGITIZER_BARREL_SWITCH ((USAGE)0x44)
  234. #endif