use num_enum::{IntoPrimitive, TryFromPrimitive};
use crate::Ident;
#[expect(missing_docs)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, TryFromPrimitive, IntoPrimitive)]
#[repr(u16)]
pub enum KnownUsage {
Undefined = 0x00,
ConsumerControl = 0x01,
NumericKeyPad = 0x02,
ProgrammableButtons = 0x03,
Microphone = 0x04,
Headphone = 0x05,
GraphicEqualizer = 0x06,
KeyboardBacklight = 0x07,
Plus10 = 0x20,
Plus100 = 0x21,
AmPm = 0x22,
Power = 0x30,
Reset = 0x31,
Sleep = 0x32,
SleepAfter = 0x33,
SleepMode = 0x34,
Illumination = 0x35,
FunctionButtons = 0x36,
Menu = 0x40,
MenuPick = 0x41,
MenuUp = 0x42,
MenuDown = 0x43,
MenuLeft = 0x44,
MenuRight = 0x45,
MenuEscape = 0x46,
MenuValueIncrease = 0x47,
MenuValueDecrease = 0x48,
DataOnScreen = 0x60,
ClosedCaption = 0x61,
ClosedCaptionSelect = 0x62,
VcrTv = 0x63,
BroadcastMode = 0x64,
Snapshot = 0x65,
Still = 0x66,
PictureInPictureToggle = 0x67,
PictureInPictureSwap = 0x68,
RedMenuButton = 0x69,
GreenMenuButton = 0x6A,
BlueMenuButton = 0x6B,
YellowMenuButton = 0x6C,
Aspect = 0x6D,
ThreeDModeSelect = 0x6E,
DisplayBrightnessIncrement = 0x6F,
DisplayBrightnessDecrement = 0x70,
DisplayBrightness = 0x71,
DisplayBacklightToggle = 0x72,
DisplaySetBrightnessToMinimum = 0x73,
DisplaySetBrightnessToMaximum = 0x74,
DisplaySetAutoBrightness = 0x75,
CameraAccessEnabled = 0x76,
CameraAccessDisabled = 0x77,
CameraAccessToggle = 0x78,
KeyboardBrightnessIncrement = 0x79,
KeyboardBrightnessDecrement = 0x7A,
KeyboardBacklightSetLevel = 0x7B,
KeyboardBacklightOoc = 0x7C,
KeyboardBacklightSetMinimum = 0x7D,
KeyboardBacklightSetMaximum = 0x7E,
KeyboardBacklightAuto = 0x7F,
Selection = 0x80,
AssignSelection = 0x81,
ModeStep = 0x82,
RecallLast = 0x83,
EnterChannel = 0x84,
OrderMovie = 0x85,
Channel = 0x86,
MediaSelection = 0x87,
MediaSelectComputer = 0x88,
MediaSelectTv = 0x89,
MediaSelectWww = 0x8A,
MediaSelectDvd = 0x8B,
MediaSelectTelephone = 0x8C,
MediaSelectProgramGuide = 0x8D,
MediaSelectVideoPhone = 0x8E,
MediaSelectGames = 0x8F,
MediaSelectMessages = 0x90,
MediaSelectCd = 0x91,
MediaSelectVcr = 0x92,
MediaSelectTuner = 0x93,
Quit = 0x94,
Help = 0x95,
MediaSelectTape = 0x96,
MediaSelectCable = 0x97,
MediaSelectSatellite = 0x98,
MediaSelectSecurity = 0x99,
MediaSelectHome = 0x9A,
MediaSelectCall = 0x9B,
ChannelIncrement = 0x9C,
ChannelDecrement = 0x9D,
MediaSelectSAP = 0x9E,
VcrPlus = 0xA0,
Once = 0xA1,
Daily = 0xA2,
Weekly = 0xA3,
Monthly = 0xA4,
Play = 0xB0,
Pause = 0xB1,
Record = 0xB2,
FastForward = 0xB3,
Rewind = 0xB4,
ScanNextTrack = 0xB5,
ScanPreviousTrack = 0xB6,
Stop = 0xB7,
Eject = 0xB8,
RandomPlay = 0xB9,
SelectDisc = 0xBA,
EnterDisc = 0xBB,
Repeat = 0xBC,
Tracking = 0xBD,
TrackNormal = 0xBE,
SlowTracking = 0xBF,
FrameForward = 0xC0,
FrameBack = 0xC1,
Mark = 0xC2,
ClearMark = 0xC3,
RepeatFromMark = 0xC4,
ReturnToMark = 0xC5,
SearchMarkForwards = 0xC6,
SearchMarkBackwards = 0xC7,
CounterReset = 0xC8,
ShowCounter = 0xC9,
TrackingIncrement = 0xCA,
TrackingDecrement = 0xCB,
StopEject = 0xCC,
PlayPause = 0xCD,
PlaySkip = 0xCE,
VoiceCommand = 0xCF,
InvokeCaptureInterface = 0xD0,
StartOrStopGameRecording = 0xD1,
HistoricalGameCapture = 0xD2,
CaptureGameScreenshot = 0xD3,
ShowOrHideRecordingIndicator = 0xD4,
StartOrStopMicrophoneCapture = 0xD5,
StartOrStopCameraCapture = 0xD6,
StartOrStopGameBroadcast = 0xD7,
StartOrStopVoiceDictationSession = 0xD8,
InvokeDismissEmojiPicker = 0xD9,
Volume = 0xE0,
Balance = 0xE1,
Mute = 0xE2,
Bass = 0xE3,
Treble = 0xE4,
BassBoost = 0xE5,
SurroundMode = 0xE6,
Loudness = 0xE7,
Mpx = 0xE8,
VolumeIncrement = 0xE9,
VolumeDecrement = 0xEA,
SpeedSelect = 0xF0,
PlaybackSpeed = 0xF1,
StandardPlay = 0xF2,
LongPlay = 0xF3,
ExtendedPlay = 0xF4,
Slow = 0xF5,
FanEnable = 0x100,
FanSpeed = 0x101,
LightEnable = 0x102,
LightIlluminationLevel = 0x103,
ClimateControlEnable = 0x104,
RoomTemperature = 0x105,
SecurityEnable = 0x106,
FireAlarm = 0x107,
PoliceAlarm = 0x108,
Proximity = 0x109,
Motion = 0x10A,
DuressAlarm = 0x10B,
HoldupAlarm = 0x10C,
MedicalAlarm = 0x10D,
BalanceRight = 0x150,
BalanceLeft = 0x151,
BassIncrement = 0x152,
BassDecrement = 0x153,
TrebleIncrement = 0x154,
TrebleDecrement = 0x155,
SpeakerSystem = 0x160,
ChannelLeft = 0x161,
ChannelRight = 0x162,
ChannelCenter = 0x163,
ChannelFront = 0x164,
ChannelCenterFront = 0x165,
ChannelSide = 0x166,
ChannelSurround = 0x167,
ChannelLowFrequencyEnhancement = 0x168,
ChannelTop = 0x169,
ChannelUnknown = 0x16A,
SubChannel = 0x170,
SubChannelIncrement = 0x171,
SubChannelDecrement = 0x172,
AlternateAudioIncrement = 0x173,
AlternateAudioDecrement = 0x174,
ApplicationLaunchButtons = 0x180,
AlLaunchButtonConfigurationTool = 0x181,
AlProgrammableButtonConfiguration = 0x182,
AlConsumerControlConfiguration = 0x183,
AlWordProcessor = 0x184,
AlTextEditor = 0x185,
AlSpreadsheet = 0x186,
AlGraphicsEditor = 0x187,
AlPresentationApp = 0x188,
AlDatabaseApp = 0x189,
AlEmailReader = 0x18A,
AlNewsreader = 0x18B,
AlVoicemail = 0x18C,
AlContactsAddressBook = 0x18D,
AlCalendarSchedule = 0x18E,
AlTaskProjectManager = 0x18F,
AlLogJournalTimecard = 0x190,
AlCheckbookFinance = 0x191,
AlCalculator = 0x192,
AlAvCapturePlayback = 0x193,
AlLocalMachineBrowser = 0x194,
AlLanWanBrowser = 0x195,
AlInternetBrowser = 0x196,
AlRemoteNetworkingIspConnect = 0x197,
AlNetworkConference = 0x198,
AlNetworkChat = 0x199,
AlTelephonyDialer = 0x19A,
AlLogon = 0x19B,
AlLogoff = 0x19C,
AlLogonLogoff = 0x19D,
AlTerminalLockScreensaver = 0x19E,
AlControlPanel = 0x19F,
AlCommandLineProcessorRun = 0x1A0,
AlProcessTaskManager = 0x1A1,
AlSelectTaskApplication = 0x1A2,
AlNextTaskApplication = 0x1A3,
AlPreviousTaskApplication = 0x1A4,
AlPreemptHaltTaskApplication = 0x1A5,
AlIntegratedHelpCenter = 0x1A6,
AlDocuments = 0x1A7,
AlThesaurus = 0x1A8,
AlDictionary = 0x1A9,
AlDesktop = 0x1AA,
AlSpellCheck = 0x1AB,
AlGrammarCheck = 0x1AC,
AlWirelessStatus = 0x1AD,
AlKeyboardLayout = 0x1AE,
AlVirusProtection = 0x1AF,
AlEncryption = 0x1B0,
AlScreenSaver = 0x1B1,
AlAlarms = 0x1B2,
AlClock = 0x1B3,
AlFileBrowser = 0x1B4,
AlPowerStatus = 0x1B5,
AlImageBrowser = 0x1B6,
AlAudioBrowser = 0x1B7,
AlMovieBrowser = 0x1B8,
AlDigitalRightsManager = 0x1B9,
AlDigitalWallet = 0x1BA,
AlInstantMessaging = 0x1BC,
AlOemFeaturesTipsTutorialBrowser = 0x1BD,
AlOemHelp = 0x1BE,
AlOnlineCommunity = 0x1BF,
AlEntertainmentContentBrowser = 0x1C0,
AlOnlineShoppingBrowser = 0x1C1,
AlSmartCardInformationHelp = 0x1C2,
AlMarketMonitorFinanceBrowser = 0x1C3,
AlCustomizedCorporateNewsBrowser = 0x1C4,
AlOnlineActivityBrowser = 0x1C5,
AlResearchSearchBrowser = 0x1C6,
AlAudioPlayer = 0x1C7,
AlMessageStatus = 0x1C8,
AlContactSync = 0x1C9,
AlNavigation = 0x1CA,
AlContextAwareDesktopAssistant = 0x1CB,
AcNew = 0x201,
AcOpen = 0x202,
AcClose = 0x203,
AcExit = 0x204,
AcMaximize = 0x205,
AcMinimize = 0x206,
AcSave = 0x207,
AcPrint = 0x208,
AcProperties = 0x209,
AcUndo = 0x21A,
AcCopy = 0x21B,
AcCut = 0x21C,
AcPaste = 0x21D,
AcSelectAll = 0x21E,
AcFind = 0x21F,
AcFindAndReplace = 0x220,
AcSearch = 0x221,
AcGoTo = 0x222,
AcHome = 0x223,
AcBack = 0x224,
AcForward = 0x225,
AcStop = 0x226,
AcRefresh = 0x227,
AcPreviousLink = 0x228,
AcNextLink = 0x229,
AcBookmarks = 0x22A,
AcHistory = 0x22B,
AcSubscriptions = 0x22C,
AcZoomIn = 0x22D,
AcZoomOut = 0x22E,
AcZoom = 0x22F,
AcFullScreenView = 0x230,
AcNormalView = 0x231,
AcViewToggle = 0x232,
AcScrollUp = 0x233,
AcScrollDown = 0x234,
AcScroll = 0x235,
AcPanLeft = 0x236,
AcPanRight = 0x237,
AcPan = 0x238,
AcNewWindow = 0x239,
AcTileHorizontally = 0x23A,
AcTileVertically = 0x23B,
AcFormat = 0x23C,
AcEdit = 0x23D,
AcBold = 0x23E,
AcItalics = 0x23F,
AcUnderline = 0x240,
AcStrikethrough = 0x241,
AcSubscript = 0x242,
AcSuperscript = 0x243,
AcAllCaps = 0x244,
AcRotate = 0x245,
AcResize = 0x246,
AcFlipHorizontal = 0x247,
AcFlipVertical = 0x248,
AcMirrorHorizontal = 0x249,
AcMirrorVertical = 0x24A,
AcFontSelect = 0x24B,
AcFontColor = 0x24C,
AcFontSize = 0x24D,
AcJustifyLeft = 0x24E,
AcJustifyCenterH = 0x24F,
AcJustifyRight = 0x250,
AcJustifyBlockH = 0x251,
AcJustifyTop = 0x252,
AcJustifyCenterV = 0x253,
AcJustifyBottom = 0x254,
AcJustifyBlockV = 0x255,
AcIndentDecrease = 0x256,
AcIndentIncrease = 0x257,
AcNumberedList = 0x258,
AcRestartNumbering = 0x259,
AcBulletedList = 0x25A,
AcPromote = 0x25B,
AcDemote = 0x25C,
AcYes = 0x25D,
AcNo = 0x25E,
AcCancel = 0x25F,
AcCatalog = 0x260,
AcBuyCheckout = 0x261,
AcAddToCart = 0x262,
AcExpand = 0x263,
AcExpandAll = 0x264,
AcCollapse = 0x265,
AcCollapseAll = 0x266,
AcPrintPreview = 0x267,
AcPasteSpecial = 0x268,
AcInsertMode = 0x269,
AcDelete = 0x26A,
AcLock = 0x26B,
AcUnlock = 0x26C,
AcProtect = 0x26D,
AcUnprotect = 0x26E,
AcAttachComment = 0x26F,
AcDeleteComment = 0x270,
AcViewComment = 0x271,
AcSelectWord = 0x272,
AcSelectSentence = 0x273,
AcSelectParagraph = 0x274,
AcSelectColumn = 0x275,
AcSelectRow = 0x276,
AcSelectTable = 0x277,
AcSelectObject = 0x278,
AcRedoRepeat = 0x279,
AcSort = 0x27A,
AcSortAscending = 0x27B,
AcSortDescending = 0x27C,
AcFilter = 0x27D,
AcSetClock = 0x27E,
AcViewClock = 0x27F,
AcSelectTimeZone = 0x280,
AcEditTimeZones = 0x281,
AcSetAlarm = 0x282,
AcClearAlarm = 0x283,
AcSnoozeAlarm = 0x284,
AcResetAlarm = 0x285,
AcSynchronize = 0x286,
AcSendReceive = 0x287,
AcSendTo = 0x288,
AcReply = 0x289,
AcReplyAll = 0x28A,
AcForwardMsg = 0x28B,
AcSend = 0x28C,
AcAttachFile = 0x28D,
AcUpload = 0x28E,
AcDownloadSaveTargetAs = 0x28F,
AcSetBorders = 0x290,
AcInsertRow = 0x291,
AcInsertColumn = 0x292,
AcInsertFile = 0x293,
AcInsertPicture = 0x294,
AcInsertObject = 0x295,
AcInsertSymbol = 0x296,
AcSaveAndClose = 0x297,
AcRename = 0x298,
AcMerge = 0x299,
AcSplit = 0x29A,
AcDistributeHorizontally = 0x29B,
AcDistributeVertically = 0x29C,
AcNextKeyboardLayoutSelect = 0x29D,
AcNavigationGuidance = 0x29E,
AcDesktopShowAllWindows = 0x29F,
AcSoftKeyLeft = 0x2A0,
AcSoftKeyRight = 0x2A1,
AcDesktopShowAllApplications = 0x2A2,
AcIdleKeepAlive = 0x2B0,
ExtendedKeyboardAttributesCollection = 0x2C0,
KeyboardFormFactor = 0x2C1,
KeyboardKeyType = 0x2C2,
KeyboardPhysicalLayout = 0x2C3,
VendorSpecificKeyboardPhysicalLayout = 0x2C4,
KeyboardIetfLanguageTagIndex = 0x2C5,
ImplementedKeyboardInputAssistControls = 0x2C6,
KeyboardInputAssistPrevious = 0x2C7,
KeyboardInputAssistNext = 0x2C8,
KeyboardInputAssistPreviousGroup = 0x2C9,
KeyboardInputAssistNextGroup = 0x2CA,
KeyboardInputAssistAccept = 0x2CB,
KeyboardInputAssistCancel = 0x2CC,
PrivacyScreenToggle = 0x2D0,
PrivacyScreenLevelDecrement = 0x2D1,
PrivacyScreenLevelIncrement = 0x2D2,
PrivacyScreenLevelMinimum = 0x2D3,
PrivacyScreenLevelMaximum = 0x2D4,
ContactEdited = 0x500,
ContactAdded = 0x501,
ContactRecordActive = 0x502,
ContactIndex = 0x503,
ContactNickname = 0x504,
ContactFirstName = 0x505,
ContactLastName = 0x506,
ContactFullName = 0x507,
ContactPhoneNumberPersonal = 0x508,
ContactPhoneNumberBusiness = 0x509,
ContactPhoneNumberMobile = 0x50A,
ContactPhoneNumberPager = 0x50B,
ContactPhoneNumberFax = 0x50C,
ContactPhoneNumberOther = 0x50D,
ContactEmailPersonal = 0x50E,
ContactEmailBusiness = 0x50F,
ContactEmailOther = 0x510,
ContactEmailMain = 0x511,
ContactSpeedDialNumber = 0x512,
ContactStatusFlag = 0x513,
ContactMisc = 0x514,
KeyboardBrightnessNext = 0x515,
KeyboardBrightnessPrevious = 0x516,
KeyboardBacklightLevelSuggestion = 0x517,
}
pub type Usage = Ident<KnownUsage, u16>;