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