1use num_enum::{IntoPrimitive, TryFromPrimitive};
4
5use crate::Ident;
6
7#[expect(missing_docs)]
12#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive, IntoPrimitive)]
13#[repr(u16)]
14#[non_exhaustive]
15pub enum KnownUsage {
16 Undefined = 0x00,
17 ConsumerControl = 0x01,
18 NumericKeyPad = 0x02,
19 ProgrammableButtons = 0x03,
20 Microphone = 0x04,
21 Headphone = 0x05,
22 GraphicEqualizer = 0x06,
23 KeyboardBacklight = 0x07,
24 Plus10 = 0x20,
26 Plus100 = 0x21,
27 AmPm = 0x22,
28 Power = 0x30,
30 Reset = 0x31,
31 Sleep = 0x32,
32 SleepAfter = 0x33,
33 SleepMode = 0x34,
34 Illumination = 0x35,
35 FunctionButtons = 0x36,
36 Menu = 0x40,
38 MenuPick = 0x41,
39 MenuUp = 0x42,
40 MenuDown = 0x43,
41 MenuLeft = 0x44,
42 MenuRight = 0x45,
43 MenuEscape = 0x46,
44 MenuValueIncrease = 0x47,
45 MenuValueDecrease = 0x48,
46 DataOnScreen = 0x60,
48 ClosedCaption = 0x61,
49 ClosedCaptionSelect = 0x62,
50 VcrTv = 0x63,
51 BroadcastMode = 0x64,
52 Snapshot = 0x65,
53 Still = 0x66,
54 PictureInPictureToggle = 0x67,
55 PictureInPictureSwap = 0x68,
56 RedMenuButton = 0x69,
57 GreenMenuButton = 0x6A,
58 BlueMenuButton = 0x6B,
59 YellowMenuButton = 0x6C,
60 Aspect = 0x6D,
61 ThreeDModeSelect = 0x6E,
62 DisplayBrightnessIncrement = 0x6F,
63 DisplayBrightnessDecrement = 0x70,
64 DisplayBrightness = 0x71,
65 DisplayBacklightToggle = 0x72,
66 DisplaySetBrightnessToMinimum = 0x73,
67 DisplaySetBrightnessToMaximum = 0x74,
68 DisplaySetAutoBrightness = 0x75,
69 CameraAccessEnabled = 0x76,
70 CameraAccessDisabled = 0x77,
71 CameraAccessToggle = 0x78,
72 KeyboardBrightnessIncrement = 0x79,
73 KeyboardBrightnessDecrement = 0x7A,
74 KeyboardBacklightSetLevel = 0x7B,
75 KeyboardBacklightOoc = 0x7C,
76 KeyboardBacklightSetMinimum = 0x7D,
77 KeyboardBacklightSetMaximum = 0x7E,
78 KeyboardBacklightAuto = 0x7F,
79 Selection = 0x80,
80 AssignSelection = 0x81,
81 ModeStep = 0x82,
82 RecallLast = 0x83,
83 EnterChannel = 0x84,
84 OrderMovie = 0x85,
85 Channel = 0x86,
86 MediaSelection = 0x87,
87 MediaSelectComputer = 0x88,
88 MediaSelectTv = 0x89,
89 MediaSelectWww = 0x8A,
90 MediaSelectDvd = 0x8B,
91 MediaSelectTelephone = 0x8C,
92 MediaSelectProgramGuide = 0x8D,
93
94 MediaSelectVideoPhone = 0x8E,
95 MediaSelectGames = 0x8F,
96 MediaSelectMessages = 0x90,
97 MediaSelectCd = 0x91,
98 MediaSelectVcr = 0x92,
99 MediaSelectTuner = 0x93,
100 Quit = 0x94,
101 Help = 0x95,
102 MediaSelectTape = 0x96,
103 MediaSelectCable = 0x97,
104 MediaSelectSatellite = 0x98,
105 MediaSelectSecurity = 0x99,
106 MediaSelectHome = 0x9A,
107 MediaSelectCall = 0x9B,
108 ChannelIncrement = 0x9C,
109 ChannelDecrement = 0x9D,
110 MediaSelectSAP = 0x9E,
111 VcrPlus = 0xA0,
113 Once = 0xA1,
114 Daily = 0xA2,
115 Weekly = 0xA3,
116 Monthly = 0xA4,
117 Play = 0xB0,
119 Pause = 0xB1,
120 Record = 0xB2,
121 FastForward = 0xB3,
122 Rewind = 0xB4,
123 ScanNextTrack = 0xB5,
124 ScanPreviousTrack = 0xB6,
125 Stop = 0xB7,
126 Eject = 0xB8,
127 RandomPlay = 0xB9,
128 SelectDisc = 0xBA,
129 EnterDisc = 0xBB,
130 Repeat = 0xBC,
131 Tracking = 0xBD,
132 TrackNormal = 0xBE,
133 SlowTracking = 0xBF,
134 FrameForward = 0xC0,
135 FrameBack = 0xC1,
136 Mark = 0xC2,
137 ClearMark = 0xC3,
138 RepeatFromMark = 0xC4,
139 ReturnToMark = 0xC5,
140 SearchMarkForwards = 0xC6,
141 SearchMarkBackwards = 0xC7,
142 CounterReset = 0xC8,
143 ShowCounter = 0xC9,
144 TrackingIncrement = 0xCA,
145 TrackingDecrement = 0xCB,
146
147 StopEject = 0xCC,
148 PlayPause = 0xCD,
149 PlaySkip = 0xCE,
150 VoiceCommand = 0xCF,
151 InvokeCaptureInterface = 0xD0,
152 StartOrStopGameRecording = 0xD1,
153 HistoricalGameCapture = 0xD2,
154 CaptureGameScreenshot = 0xD3,
155 ShowOrHideRecordingIndicator = 0xD4,
156 StartOrStopMicrophoneCapture = 0xD5,
157 StartOrStopCameraCapture = 0xD6,
158 StartOrStopGameBroadcast = 0xD7,
159 StartOrStopVoiceDictationSession = 0xD8,
160 InvokeDismissEmojiPicker = 0xD9,
161 Volume = 0xE0,
163 Balance = 0xE1,
164 Mute = 0xE2,
165 Bass = 0xE3,
166 Treble = 0xE4,
167 BassBoost = 0xE5,
168 SurroundMode = 0xE6,
169 Loudness = 0xE7,
170 Mpx = 0xE8,
171 VolumeIncrement = 0xE9,
172 VolumeDecrement = 0xEA,
173 SpeedSelect = 0xF0,
175 PlaybackSpeed = 0xF1,
176 StandardPlay = 0xF2,
177 LongPlay = 0xF3,
178 ExtendedPlay = 0xF4,
179 Slow = 0xF5,
180 FanEnable = 0x100,
182 FanSpeed = 0x101,
183 LightEnable = 0x102,
184 LightIlluminationLevel = 0x103,
185 ClimateControlEnable = 0x104,
186 RoomTemperature = 0x105,
187 SecurityEnable = 0x106,
188 FireAlarm = 0x107,
189 PoliceAlarm = 0x108,
190 Proximity = 0x109,
191 Motion = 0x10A,
192 DuressAlarm = 0x10B,
193 HoldupAlarm = 0x10C,
194 MedicalAlarm = 0x10D,
195 BalanceRight = 0x150,
197 BalanceLeft = 0x151,
198 BassIncrement = 0x152,
199 BassDecrement = 0x153,
200 TrebleIncrement = 0x154,
201 TrebleDecrement = 0x155,
202 SpeakerSystem = 0x160,
204 ChannelLeft = 0x161,
205 ChannelRight = 0x162,
206 ChannelCenter = 0x163,
207 ChannelFront = 0x164,
208 ChannelCenterFront = 0x165,
209 ChannelSide = 0x166,
210 ChannelSurround = 0x167,
211 ChannelLowFrequencyEnhancement = 0x168,
212 ChannelTop = 0x169,
213 ChannelUnknown = 0x16A,
214 SubChannel = 0x170,
216 SubChannelIncrement = 0x171,
217 SubChannelDecrement = 0x172,
218 AlternateAudioIncrement = 0x173,
219 AlternateAudioDecrement = 0x174,
220 ApplicationLaunchButtons = 0x180,
222 AlLaunchButtonConfigurationTool = 0x181,
223 AlProgrammableButtonConfiguration = 0x182,
224 AlConsumerControlConfiguration = 0x183,
225 AlWordProcessor = 0x184,
226 AlTextEditor = 0x185,
227 AlSpreadsheet = 0x186,
228 AlGraphicsEditor = 0x187,
229 AlPresentationApp = 0x188,
230 AlDatabaseApp = 0x189,
231 AlEmailReader = 0x18A,
232 AlNewsreader = 0x18B,
233 AlVoicemail = 0x18C,
234 AlContactsAddressBook = 0x18D,
235 AlCalendarSchedule = 0x18E,
236 AlTaskProjectManager = 0x18F,
237 AlLogJournalTimecard = 0x190,
238 AlCheckbookFinance = 0x191,
239 AlCalculator = 0x192,
240 AlAvCapturePlayback = 0x193,
241 AlLocalMachineBrowser = 0x194,
242 AlLanWanBrowser = 0x195,
243 AlInternetBrowser = 0x196,
244 AlRemoteNetworkingIspConnect = 0x197,
245 AlNetworkConference = 0x198,
246 AlNetworkChat = 0x199,
247 AlTelephonyDialer = 0x19A,
248 AlLogon = 0x19B,
249 AlLogoff = 0x19C,
250 AlLogonLogoff = 0x19D,
251 AlTerminalLockScreensaver = 0x19E,
252 AlControlPanel = 0x19F,
253 AlCommandLineProcessorRun = 0x1A0,
254 AlProcessTaskManager = 0x1A1,
255 AlSelectTaskApplication = 0x1A2,
256 AlNextTaskApplication = 0x1A3,
257 AlPreviousTaskApplication = 0x1A4,
258 AlPreemptHaltTaskApplication = 0x1A5,
259 AlIntegratedHelpCenter = 0x1A6,
260 AlDocuments = 0x1A7,
261 AlThesaurus = 0x1A8,
262 AlDictionary = 0x1A9,
263 AlDesktop = 0x1AA,
264
265 AlSpellCheck = 0x1AB,
266 AlGrammarCheck = 0x1AC,
267 AlWirelessStatus = 0x1AD,
268 AlKeyboardLayout = 0x1AE,
269 AlVirusProtection = 0x1AF,
270 AlEncryption = 0x1B0,
271 AlScreenSaver = 0x1B1,
272 AlAlarms = 0x1B2,
273 AlClock = 0x1B3,
274 AlFileBrowser = 0x1B4,
275 AlPowerStatus = 0x1B5,
276 AlImageBrowser = 0x1B6,
277 AlAudioBrowser = 0x1B7,
278 AlMovieBrowser = 0x1B8,
279 AlDigitalRightsManager = 0x1B9,
280 AlDigitalWallet = 0x1BA,
281
282 AlInstantMessaging = 0x1BC,
283 AlOemFeaturesTipsTutorialBrowser = 0x1BD,
284 AlOemHelp = 0x1BE,
285 AlOnlineCommunity = 0x1BF,
286 AlEntertainmentContentBrowser = 0x1C0,
287 AlOnlineShoppingBrowser = 0x1C1,
288 AlSmartCardInformationHelp = 0x1C2,
289 AlMarketMonitorFinanceBrowser = 0x1C3,
290 AlCustomizedCorporateNewsBrowser = 0x1C4,
291 AlOnlineActivityBrowser = 0x1C5,
292 AlResearchSearchBrowser = 0x1C6,
293 AlAudioPlayer = 0x1C7,
294 AlMessageStatus = 0x1C8,
295 AlContactSync = 0x1C9,
296 AlNavigation = 0x1CA,
297 AlContextAwareDesktopAssistant = 0x1CB,
298 AcNew = 0x201,
300 AcOpen = 0x202,
301 AcClose = 0x203,
302 AcExit = 0x204,
303 AcMaximize = 0x205,
304 AcMinimize = 0x206,
305 AcSave = 0x207,
306 AcPrint = 0x208,
307 AcProperties = 0x209,
308 AcUndo = 0x21A,
310 AcCopy = 0x21B,
311 AcCut = 0x21C,
312 AcPaste = 0x21D,
313 AcSelectAll = 0x21E,
314 AcFind = 0x21F,
315 AcFindAndReplace = 0x220,
316 AcSearch = 0x221,
317 AcGoTo = 0x222,
318 AcHome = 0x223,
319 AcBack = 0x224,
320 AcForward = 0x225,
321 AcStop = 0x226,
322 AcRefresh = 0x227,
323 AcPreviousLink = 0x228,
324 AcNextLink = 0x229,
325 AcBookmarks = 0x22A,
326 AcHistory = 0x22B,
327 AcSubscriptions = 0x22C,
328 AcZoomIn = 0x22D,
329 AcZoomOut = 0x22E,
330 AcZoom = 0x22F,
331 AcFullScreenView = 0x230,
332 AcNormalView = 0x231,
333 AcViewToggle = 0x232,
334 AcScrollUp = 0x233,
335 AcScrollDown = 0x234,
336 AcScroll = 0x235,
337 AcPanLeft = 0x236,
338 AcPanRight = 0x237,
339 AcPan = 0x238,
340 AcNewWindow = 0x239,
341 AcTileHorizontally = 0x23A,
342 AcTileVertically = 0x23B,
343 AcFormat = 0x23C,
344 AcEdit = 0x23D,
345 AcBold = 0x23E,
346 AcItalics = 0x23F,
347 AcUnderline = 0x240,
348 AcStrikethrough = 0x241,
349 AcSubscript = 0x242,
350 AcSuperscript = 0x243,
351 AcAllCaps = 0x244,
352 AcRotate = 0x245,
353 AcResize = 0x246,
354 AcFlipHorizontal = 0x247,
355 AcFlipVertical = 0x248,
356 AcMirrorHorizontal = 0x249,
357 AcMirrorVertical = 0x24A,
358 AcFontSelect = 0x24B,
359 AcFontColor = 0x24C,
360 AcFontSize = 0x24D,
361 AcJustifyLeft = 0x24E,
362 AcJustifyCenterH = 0x24F,
363 AcJustifyRight = 0x250,
364 AcJustifyBlockH = 0x251,
365 AcJustifyTop = 0x252,
366 AcJustifyCenterV = 0x253,
367 AcJustifyBottom = 0x254,
368 AcJustifyBlockV = 0x255,
369 AcIndentDecrease = 0x256,
370 AcIndentIncrease = 0x257,
371 AcNumberedList = 0x258,
372 AcRestartNumbering = 0x259,
373 AcBulletedList = 0x25A,
374 AcPromote = 0x25B,
375 AcDemote = 0x25C,
376 AcYes = 0x25D,
377 AcNo = 0x25E,
378 AcCancel = 0x25F,
379 AcCatalog = 0x260,
380 AcBuyCheckout = 0x261,
381 AcAddToCart = 0x262,
382 AcExpand = 0x263,
383 AcExpandAll = 0x264,
384 AcCollapse = 0x265,
385 AcCollapseAll = 0x266,
386 AcPrintPreview = 0x267,
387 AcPasteSpecial = 0x268,
388 AcInsertMode = 0x269,
389 AcDelete = 0x26A,
390 AcLock = 0x26B,
391 AcUnlock = 0x26C,
392 AcProtect = 0x26D,
393 AcUnprotect = 0x26E,
394 AcAttachComment = 0x26F,
395 AcDeleteComment = 0x270,
396 AcViewComment = 0x271,
397 AcSelectWord = 0x272,
398 AcSelectSentence = 0x273,
399 AcSelectParagraph = 0x274,
400 AcSelectColumn = 0x275,
401 AcSelectRow = 0x276,
402 AcSelectTable = 0x277,
403 AcSelectObject = 0x278,
404 AcRedoRepeat = 0x279,
405 AcSort = 0x27A,
406 AcSortAscending = 0x27B,
407 AcSortDescending = 0x27C,
408 AcFilter = 0x27D,
409 AcSetClock = 0x27E,
410 AcViewClock = 0x27F,
411 AcSelectTimeZone = 0x280,
412 AcEditTimeZones = 0x281,
413 AcSetAlarm = 0x282,
414 AcClearAlarm = 0x283,
415 AcSnoozeAlarm = 0x284,
416 AcResetAlarm = 0x285,
417 AcSynchronize = 0x286,
418 AcSendReceive = 0x287,
419 AcSendTo = 0x288,
420 AcReply = 0x289,
421 AcReplyAll = 0x28A,
422 AcForwardMsg = 0x28B,
423 AcSend = 0x28C,
424 AcAttachFile = 0x28D,
425 AcUpload = 0x28E,
426 AcDownloadSaveTargetAs = 0x28F,
427 AcSetBorders = 0x290,
428 AcInsertRow = 0x291,
429 AcInsertColumn = 0x292,
430 AcInsertFile = 0x293,
431 AcInsertPicture = 0x294,
432 AcInsertObject = 0x295,
433 AcInsertSymbol = 0x296,
434 AcSaveAndClose = 0x297,
435 AcRename = 0x298,
436 AcMerge = 0x299,
437 AcSplit = 0x29A,
438 AcDistributeHorizontally = 0x29B,
439 AcDistributeVertically = 0x29C,
440 AcNextKeyboardLayoutSelect = 0x29D,
441 AcNavigationGuidance = 0x29E,
442 AcDesktopShowAllWindows = 0x29F,
443 AcSoftKeyLeft = 0x2A0,
444 AcSoftKeyRight = 0x2A1,
445 AcDesktopShowAllApplications = 0x2A2,
446 AcIdleKeepAlive = 0x2B0,
448 ExtendedKeyboardAttributesCollection = 0x2C0,
450 KeyboardFormFactor = 0x2C1,
451 KeyboardKeyType = 0x2C2,
452 KeyboardPhysicalLayout = 0x2C3,
453 VendorSpecificKeyboardPhysicalLayout = 0x2C4,
454 KeyboardIetfLanguageTagIndex = 0x2C5,
455 ImplementedKeyboardInputAssistControls = 0x2C6,
456 KeyboardInputAssistPrevious = 0x2C7,
457 KeyboardInputAssistNext = 0x2C8,
458 KeyboardInputAssistPreviousGroup = 0x2C9,
459 KeyboardInputAssistNextGroup = 0x2CA,
460 KeyboardInputAssistAccept = 0x2CB,
461 KeyboardInputAssistCancel = 0x2CC,
462 PrivacyScreenToggle = 0x2D0,
464 PrivacyScreenLevelDecrement = 0x2D1,
465 PrivacyScreenLevelIncrement = 0x2D2,
466 PrivacyScreenLevelMinimum = 0x2D3,
467 PrivacyScreenLevelMaximum = 0x2D4,
468 ContactEdited = 0x500,
470 ContactAdded = 0x501,
471 ContactRecordActive = 0x502,
472 ContactIndex = 0x503,
473 ContactNickname = 0x504,
474 ContactFirstName = 0x505,
475 ContactLastName = 0x506,
476 ContactFullName = 0x507,
477 ContactPhoneNumberPersonal = 0x508,
478 ContactPhoneNumberBusiness = 0x509,
479 ContactPhoneNumberMobile = 0x50A,
480 ContactPhoneNumberPager = 0x50B,
481 ContactPhoneNumberFax = 0x50C,
482 ContactPhoneNumberOther = 0x50D,
483 ContactEmailPersonal = 0x50E,
484 ContactEmailBusiness = 0x50F,
485 ContactEmailOther = 0x510,
486 ContactEmailMain = 0x511,
487 ContactSpeedDialNumber = 0x512,
488 ContactStatusFlag = 0x513,
489 ContactMisc = 0x514,
490 KeyboardBrightnessNext = 0x515,
491 KeyboardBrightnessPrevious = 0x516,
492 KeyboardBacklightLevelSuggestion = 0x517,
493 }
495
496pub type Usage = Ident<KnownUsage, u16>;