Now using SharpLib.Hid and SharpLib.Win32 as namespaces.
2 // Copyright (C) 2014-2015 Stéphane Lenclud.
4 // This file is part of SharpLibHid.
6 // SharpDisplayManager is free software: you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation, either version 3 of the License, or
9 // (at your option) any later version.
11 // SharpDisplayManager is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with SharpDisplayManager. If not, see <http://www.gnu.org/licenses/>.
20 namespace SharpLib.Hid
23 /// From USB HID usage tables.
24 /// http://www.usb.org/developers/hidpage#HID_Usage
25 /// http://www.usb.org/developers/devclass_docs/Hut1_12v2.pdf
27 public enum UsagePage : ushort
30 GenericDesktopControls,
32 VirtualRealityControls,
35 GenericDeviceControls,
43 PhysicalInterfaceDevice = 0x0f,
45 AlphaNumericDisplay = 0x14,
46 MedicalInstruments = 0x40,
55 BarCodeScanner = 0x8c,
61 // http://msdn.microsoft.com/en-us/library/windows/desktop/bb417079.aspx
62 WindowsMediaCenterRemoteControl = 0xffbc,
63 TerraTecRemote = 0xffcc
67 /// Usage Collections are special values from our Usage enumeration.
68 /// Thus they are also part of the corresponding Usage enumeration.
70 namespace UsageCollection
73 /// Usage Collection for usage page GenericDesktopControls.
75 public enum GenericDesktop : ushort
83 MultiAxisController = 0x08,
84 TabletPCSystemControls = 0x09,
89 /// Usage Collection for usage page Consumer.
91 public enum Consumer : ushort
93 ConsumerControl = 0x01,
95 ProgrammableButtons = 0x03,
98 GraphicEqualizer = 0x06,
99 FunctionButtons = 0x36,
101 MediaSelection = 0x0087,
103 PlaybackSpeed = 0x00F1,
105 SpeakerSystem = 0x0160,
106 ChannelLeft = 0x0161,
107 ChannelRight = 0x0162,
108 ChannelCenter = 0x0163,
109 ChannelFront = 0x0164,
110 ChannelCenterFront = 0x0165,
111 ChannelSide = 0x0166,
112 ChannelSurrond = 0x0167,
113 ChannelLowFrequencyEnhancement = 0x0168,
115 ChannelUnknown = 0x016A,
116 ApplicationLaunchButtons = 0x016A,
117 GenericGuiApplicationControls = 0x0200,
121 public enum WindowsMediaCenter : ushort
123 WindowsMediaCenterRemoteControl = 0x88
135 public enum WindowsMediaCenterRemoteControl : ushort
138 /// Not defined by the Microsoft specs.
142 ClosedCaptioning = 0x2B,
145 TeletextGreen = 0x5C,
146 TeletextYellow = 0x5D,
162 /// First press action: Ejects a DVD drive.
164 /// Second press action: Repeats first press action.
166 /// Notably issued by XBOX360 remote as defined in irplus - Remote Control - Android application.
171 /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
172 /// Collection (page 0xFFBC, usage 0x88).
174 /// Second press action: Repeats message.
178 /// Notably sent by the 'Visualization' button of HP Windows Media Center Remote (TSGH-IR08).
180 /// According to HP specs it displays visual imagery that is synchronized to the sound of your music tracks.
184 /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
185 /// Collection (page 0xFFBC, usage 0x88).
187 /// Second press action: Repeats message.
191 /// Notably sent by the 'Slide Show' button of HP Windows Media Center Remote (TSGH-IR08).
193 /// According to HP specs it plays a slide show of all the pictures on your hard disk drive.
197 /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
198 /// Collection (page 0xFFBC, usage 0x88).
200 /// Second press action: Repeats message.
204 /// Notably sent by the 'Eject' button of HP Windows Media Center Remote (TSGH-IR08).
205 /// Also interpreted as 'Eject' action by SoundGraph iMON Manager in MCE mode (OrigenAE VF310).
209 /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
210 /// Collection (page 0xFFBC, usage 0x88).
212 /// Second press action: Repeats message.
216 /// Notably sent by the 'Input selection' button of HP Windows Media Center Remote (TSGH-IR08).
234 /// First press action: Generates OEM2 HID message in the Media Center Vendor Specific
235 /// Collection. This button is intended to control the front panel display of home entertainment
236 /// computers. When this button is pressed, the display could be turned on or off, or the display
237 /// mode could change.
239 /// Second press action: Repeats message.
243 /// Notably issued by XBOX360 remote as defined in irplus - Remote Control - Android application.
247 /// First press action: To be determined.
249 /// Second press action: Repeats message.
254 NetworkSelection = 0x2C,
257 VideoSelection = 0x61
261 /// Those codes come from experimenting with HP remotes.
263 public enum HpWindowsMediaCenterRemoteControl : ushort
266 /// Displays visual imagery that is synchronized to the sound of your music tracks.
268 /// Second press action: Repeats message.
272 /// Notably sent by the 'Visualization' button of HP Windows Media Center Remote (TSGH-IR08).
274 /// According to HP specs it displays visual imagery that is synchronized to the sound of your music tracks.
276 Visualization = WindowsMediaCenterRemoteControl.Ext0,
278 /// Plays a slide show of all the pictures on your hard disk drive.
280 /// Second press action: Repeats message.
284 /// Notably sent by the 'Slide Show' button of HP Windows Media Center Remote (TSGH-IR08).
286 /// According to HP specs it plays a slide show of all the pictures on your hard disk drive.
288 SlideShow = WindowsMediaCenterRemoteControl.Ext1,
290 /// Eject optical drive.
292 /// Second press action: Repeats message.
296 /// Notably sent by the 'Eject' button of HP Windows Media Center Remote (TSGH-IR08).
297 /// Also interpreted as 'Eject' action by SoundGraph iMON Manager in MCE mode (OrigenAE VF310).
299 HpEject = WindowsMediaCenterRemoteControl.Ext2,
301 /// Not sure what this should do.
303 /// Second press action: Repeats message.
307 /// Notably sent by the 'Input selection' button of HP Windows Media Center Remote (TSGH-IR08).
309 InputSelection = WindowsMediaCenterRemoteControl.Ext3,
313 /// Usage Table for Consumer Controls
316 public enum ConsumerControl : ushort
319 ConsumerControl = 0x01,
320 NumericKeyPad = 0x02,
321 ProgrammableButtons = 0x03,
324 GraphicEqualizer = 0x06,
334 FunctionButtons = 0x36,
342 MenuValueIncrease = 0x47,
343 MenuValueDecrease = 0x48,
345 ClosedCaption = 0x61,
346 ClosedCaptionSelect = 0x62,
348 BroadcastMode = 0x64,
352 AssignSelection = 0x81,
358 MediaSelection = 0x87,
359 MediaSelectComputer = 0x88,
360 MediaSelectTv = 0x89,
361 MediaSelectWww = 0x8A,
362 MediaSelectDvd = 0x8B,
363 MediaSelectTelephone = 0x8C,
364 MediaSelectProgramGuide = 0x8D,
365 MediaSelectVideoPhone = 0x8E,
366 MediaSelectGames = 0x8F,
367 MediaSelectMessages = 0x90,
368 MediaSelectCd = 0x91,
369 MediaSelectVcr = 0x92,
370 MediaSelectTuner = 0x93,
373 MediaSelectTape = 0x96,
374 MediaSelectCable = 0x97,
375 MediaSelectSatellite = 0x98,
376 MediaSelectSecurity = 0x99,
377 MediaSelectHome = 0x9A,
378 MediaSelectCall = 0x9B,
379 ChannelIncrement = 0x9C,
380 ChannelDecrement = 0x9D,
381 MediaSelectSap = 0x9E,
392 ScanNextTrack = 0xB5,
393 ScanPreviousTrack = 0xB6,
407 RepeatFromMark = 0xC4,
409 SearchMarkForward = 0xC6,
410 SearchMarkBackwards = 0xC7,
413 TrackingIncrement = 0xCA,
414 TrackingDecrement = 0xCB,
427 VolumeIncrement = 0xE9,
428 VolumeDecrement = 0xEA,
430 PlaybackSpeed = 0xF1,
438 LightIlluminationLevel = 0x103,
439 ClimateControlEnable = 0x104,
440 RoomTemperature = 0x105,
441 SecurityEnable = 0x106,
448 MedicalAlarm = 0x10D,
449 BalanceRight = 0x150,
451 BassIncrement = 0x152,
452 BassDecrement = 0x153,
453 TrebleIncrement = 0x154,
454 TrebleDecrement = 0x155,
455 SpeakerSystem = 0x160,
457 ChannelRight = 0x162,
458 ChannelCenter = 0x163,
459 ChannelFront = 0x164,
460 ChannelCenterFront = 0x165,
462 ChannelSurround = 0x167,
463 ChannelLowFrequencyEnhancement = 0x168,
465 ChannelUnknown = 0x16A,
467 SubChannelIncrement = 0x171,
468 SubChannelDecrement = 0x172,
469 AlternateAudioIncrement = 0x173,
470 AlternateAudioDecrement = 0x174,
471 ApplicationLaunchButtons = 0x180,
472 AppLaunchLaunchButtonConfigurationTool = 0x181,
473 AppLaunchProgrammableButtonConfiguration = 0x182,
474 AppLaunchConsumerControlConfiguration = 0x183,
475 AppLaunchWordProcessor = 0x184,
476 AppLaunchTextEditor = 0x185,
477 AppLaunchSpreadsheet = 0x186,
478 AppLaunchGraphicsEditor = 0x187,
479 AppLaunchPresentationApp = 0x188,
480 AppLaunchDatabaseApp = 0x189,
481 AppLaunchEmailReader = 0x18A,
482 AppLaunchNewsreader = 0x18B,
483 AppLaunchVoicemail = 0x18C,
484 AppLaunchContactsAddressBook = 0x18D,
485 AppLaunchCalendarSchedule = 0x18E,
486 AppLaunchTaskProjectManager = 0x18F,
487 AppLaunchLogJournalTimecard = 0x190,
488 AppLaunchCheckbookFinance = 0x191,
489 AppLaunchCalculator = 0x192,
490 AppLaunchAVCapturePlayback = 0x193,
491 AppLaunchLocalMachineBrowser = 0x194,
492 AppLaunchLanWanBrowser = 0x195,
493 AppLaunchInternetBrowser = 0x196,
494 AppLaunchRemoteNetworkingIspConnect = 0x197,
495 AppLaunchNetworkConference = 0x198,
496 AppLaunchNetworkChat = 0x199,
497 AppLaunchTelephonyDialer = 0x19A,
498 AppLaunchLogon = 0x19B,
499 AppLaunchLogoff = 0x19C,
500 AppLaunchLogonLogoff = 0x19D,
501 AppLaunchTerminalLockScreensaver = 0x19E,
502 AppLaunchControlPanel = 0x19F,
503 AppLaunchCommandLineProcessorRun = 0x1A0,
504 AppLaunchProcessTaskManager = 0x1A1,
505 AppLaunchSelectTaskApplication = 0x1A2,
506 AppLaunchNextTaskApplication = 0x1A3,
507 AppLaunchPreviousTaskApplication = 0x1A4,
508 AppLaunchPreemptiveHaltTaskApplication = 0x1A5,
509 AppLaunchIntegratedHelpCenter = 0x1A6,
510 AppLaunchDocuments = 0x1A7,
511 AppLaunchThesaurus = 0x1A8,
512 AppLaunchDictionary = 0x1A9,
513 AppLaunchDesktop = 0x1AA,
514 AppLaunchSpellCheck = 0x1AB,
515 AppLaunchGrammarCheck = 0x1AC,
516 AppLaunchWirelessStatus = 0x1AD,
517 AppLaunchKeyboardLayout = 0x1AE,
518 AppLaunchVirusProtection = 0x1AF,
519 AppLaunchEncryption = 0x1B0,
520 AppLaunchScreenSaver = 0x1B1,
521 AppLaunchAlarms = 0x1B2,
522 AppLaunchClock = 0x1B3,
523 AppLaunchFileBrowser = 0x1B4,
524 AppLaunchPowerStatus = 0x1B5,
525 AppLaunchImageBrowser = 0x1B6,
526 AppLaunchAudioBrowser = 0x1B7,
527 AppLaunchMovieBrowser = 0x1B8,
528 AppLaunchDigitalRightsManager = 0x1B9,
529 AppLaunchDigitalWallet = 0x1BA,
530 AppLaunchInstantMessaging = 0x1BC,
531 AppLaunchOemFeaturesTipsTutorialBrowser = 0x1BD,
532 AppLaunchOemHelp = 0x1BE,
533 AppLaunchOnlineCommunity = 0x1BF,
534 AppLaunchEntertainmentContentBrowser = 0x1C0,
535 AppLaunchOnlineShoppingBrowser = 0x1C1,
536 AppLaunchSmartcardInformationHelp = 0x1C2,
537 AppLaunchMarketMonitorFinanceBrowser = 0x1C3,
538 AppLaunchCustomizedCorporateNewsBrowser = 0x1C4,
539 AppLaunchOnlineActivityBrowser = 0x1C5,
540 AppLaunchResearchSearchBrowser = 0x1C6,
541 AppLaunchAudioPlayer = 0x1C7,
542 GenericGuiApplicationControls = 0x200,
545 AppCtrlClose = 0x203,
547 AppCtrlMaximize = 0x205,
548 AppCtrlMinimize = 0x206,
550 AppCtrlPrint = 0x208,
551 AppCtrlProperties = 0x209,
555 AppCtrlPaste = 0x21D,
556 AppCtrlSelectAll = 0x21E,
558 AppCtrlFindAndReplace = 0x220,
559 AppCtrlSearch = 0x221,
563 AppCtrlForward = 0x225,
565 AppCtrlRefresh = 0x227,
566 AppCtrlPreviousLink = 0x228,
567 AppCtrlNextLink = 0x229,
568 AppCtrlBookmarks = 0x22A,
569 AppCtrlHistory = 0x22B,
570 AppCtrlSubscriptions = 0x22C,
571 AppCtrlZoomIn = 0x22D,
572 AppCtrlZoomOut = 0x22E,
574 AppCtrlFullScreenView = 0x230,
575 AppCtrlNormalView = 0x231,
576 AppCtrlViewToggle = 0x232,
577 AppCtrlScrollUp = 0x233,
578 AppCtrlScrollDown = 0x234,
579 AppCtrlScroll = 0x235,
580 AppCtrlPanLeft = 0x236,
581 AppCtrlPanRight = 0x237,
583 AppCtrlNewWindow = 0x239,
584 AppCtrlTileHorizontally = 0x23A,
585 AppCtrlTileVertically = 0x23B,
586 AppCtrlFormat = 0x23C,
589 AppCtrlItalics = 0x23F,
590 AppCtrlUnderline = 0x240,
591 AppCtrlStrikethrough = 0x241,
592 AppCtrlSubscript = 0x242,
593 AppCtrlSuperscript = 0x243,
594 AppCtrlAllCaps = 0x244,
595 AppCtrlRotate = 0x245,
596 AppCtrlResize = 0x246,
597 AppCtrlFlipHorizontal = 0x247,
598 AppCtrlFlipVertical = 0x248,
599 AppCtrlMirrorHorizontal = 0x249,
600 AppCtrlMirrorVertical = 0x24A,
601 AppCtrlFontSelect = 0x24B,
602 AppCtrlFontColor = 0x24C,
603 AppCtrlFontSize = 0x24D,
604 AppCtrlJustifyLeft = 0x24E,
605 AppCtrlJustifyCenterH = 0x24F,
606 AppCtrlJustifyRight = 0x250,
607 AppCtrlJustifyBlockH = 0x251,
608 AppCtrlJustifyTop = 0x252,
609 AppCtrlJustifyCenterV = 0x253,
610 AppCtrlJustifyBottom = 0x254,
611 AppCtrlJustifyBlockV = 0x255,
612 AppCtrlIndentDecrease = 0x256,
613 AppCtrlIndentIncrease = 0x257,
614 AppCtrlNumberedList = 0x258,
615 AppCtrlRestartNumbering = 0x259,
616 AppCtrlBulletedList = 0x25A,
617 AppCtrlPromote = 0x25B,
618 AppCtrlDemote = 0x25C,
621 AppCtrlCancel = 0x25F,
622 AppCtrlCatalog = 0x260,
623 AppCtrlBuyCheckout = 0x261,
624 AppCtrlAddToCart = 0x262,
625 AppCtrlExpand = 0x263,
626 AppCtrlExpandAll = 0x264,
627 AppCtrlCollapse = 0x265,
628 AppCtrlCollapseAll = 0x266,
629 AppCtrlPrintPreview = 0x267,
630 AppCtrlPasteSpecial = 0x268,
631 AppCtrlInsertMode = 0x269,
632 AppCtrlDelete = 0x26A,
634 AppCtrlUnlock = 0x26C,
635 AppCtrlProtect = 0x26D,
636 AppCtrlUnprotect = 0x26E,
637 AppCtrlAttachComment = 0x26F,
638 AppCtrlDeleteComment = 0x270,
639 AppCtrlViewComment = 0x271,
640 AppCtrlSelectWord = 0x272,
641 AppCtrlSelectSentence = 0x273,
642 AppCtrlSelectParagraph = 0x274,
643 AppCtrlSelectColumn = 0x275,
644 AppCtrlSelectRow = 0x276,
645 AppCtrlSelectTable = 0x277,
646 AppCtrlSelectObject = 0x278,
647 AppCtrlRedoRepeat = 0x279,
649 AppCtrlSortAscending = 0x27B,
650 AppCtrlSortDescending = 0x27C,
651 AppCtrlFilter = 0x27D,
652 AppCtrlSetClock = 0x27E,
653 AppCtrlViewClock = 0x27F,
654 AppCtrlSelectTimeZone = 0x280,
655 AppCtrlEditTimeZones = 0x281,
656 AppCtrlSetAlarm = 0x282,
657 AppCtrlClearAlarm = 0x283,
658 AppCtrlSnoozeAlarm = 0x284,
659 AppCtrlResetAlarm = 0x285,
660 AppCtrlSynchronize = 0x286,
661 AppCtrlSendReceive = 0x287,
662 AppCtrlSendTo = 0x288,
663 AppCtrlReply = 0x289,
664 AppCtrlReplyAll = 0x28A,
665 AppCtrlForwardMsg = 0x28B,
667 AppCtrlAttachFile = 0x28D,
668 AppCtrlUpload = 0x28E,
669 AppCtrlDownloadSaveTargetAs = 0x28F,
670 AppCtrlSetBorders = 0x290,
671 AppCtrlInsertRow = 0x291,
672 AppCtrlInsertColumn = 0x292,
673 AppCtrlInsertFile = 0x293,
674 AppCtrlInsertPicture = 0x294,
675 AppCtrlInsertObject = 0x295,
676 AppCtrlInsertSymbol = 0x296,
677 AppCtrlSaveAndClose = 0x297,
678 AppCtrlRename = 0x298,
679 AppCtrlMerge = 0x299,
680 AppCtrlSplit = 0x29A,
681 AppCtrlDistributeHorizontally = 0x29B,
682 AppCtrlDistributeVertically = 0x29C
688 enum GenericDesktop : ushort
697 MultiAxisController = 0x08,
698 TabletPcSystemControls = 0x09,
709 CountedBuffer = 0x3A,
721 SystemControl = 0x80,
722 SystemPowerDown = 0x81,
725 SystemContextMenu = 0x84,
726 SystemMainMenu = 0x85,
727 SystemAppMenu = 0x86,
728 SystemMenuHelp = 0x87,
729 SystemMenuExit = 0x88,
730 SystemMenuSelect = 0x89,
731 SystemMenuRight = 0x8A,
732 SystemMenuLeft = 0x8B,
734 SystemMenuDown = 0x8D,
735 SystemColdRestart = 0x8E,
736 SystemWarmRestart = 0x8F,
745 SystemDebuggerBreak = 0xA4,
746 ApplicationBreak = 0xA5,
747 ApplicationDebuggerBreak = 0xA6,
748 SystemSpeakerMute = 0xA7,
749 SystemHibernate = 0xA8,
750 SystemDisplayInvert = 0xB0,
751 SystemDisplayInternal = 0xB1,
752 SystemDisplayExternal = 0xB2,
753 SystemDisplayBoth = 0xB3,
754 SystemDisplayDual = 0xB4,
755 SystemDisplayToggleIntExt = 0xB5,
756 SystemDisplaySwapPrimarySecondary = 0xB6,
757 SystemDisplayLcdAutoscale = 0xB7
763 enum SimulationControl : ushort
766 FlightSimulationDevice = 0x01,
767 AutomobileSimulationDevice = 0x02,
768 TankSimulationDevice = 0x03,
769 SpaceshipSimulationDevice = 0x04,
770 SubmarineSimulationDevice = 0x05,
771 SailingSimulationDevice = 0x06,
772 MotorcycleSimulationDevice = 0x07,
773 SportsSimulationDevice = 0x08,
774 AirplaneSimulationDevice = 0x09,
775 HelicopterSimulationDevice = 0x0A,
776 MagicCarpetSimulationDevice = 0x0B,
777 BicycleSimulationDevice = 0x0C,
778 FlightControlStick = 0x20,
780 CyclicControl = 0x22,
786 AntiTorqueControl = 0xB2,
787 AutopilotEnable = 0xB3,
789 CollectiveControl = 0xB5,
791 ElectronicCountermeasures = 0xB7,
796 FlightCommunications = 0xBC,
802 WeaponsSelect = 0xC2,
809 TurretDirection = 0xC9,
810 BarrelElevation = 0xCA,
822 enum GameControl : ushort
825 GameController3D = 0x01,
826 PinballDevice = 0x02,
829 TurnRightLeft = 0x21,
830 PitchForwardBackward = 0x22,
831 RollRightLeft = 0x23,
832 MoveRightLeft = 0x24,
833 MoveForwardBackward = 0x25,
835 LeanRightLeft = 0x27,
836 LeanForwardBackward = 0x28,
839 SecondaryFlipper = 0x2B,
847 GunSingleShot = 0x33,
851 GamepadFireJump = 0x37,
852 GamepadTrigger = 0x39
858 enum TelephonyDevice : ushort
862 AnsweringMachine = 0x02,
863 MessageControls = 0x03,
866 TelephonyKeyPad = 0x06,
867 ProgrammableButton = 0x07,
877 AlternateFunction = 0x29,
889 PhoneDirectory = 0x53,
895 InsideDialTone = 0x90,
896 OutsideDialTone = 0x91,
897 InsideRingTone = 0x92,
898 OutsideRingTone = 0x93,
899 PriorityRingTone = 0x94,
900 InsideRingback = 0x95,
901 PriorityRingback = 0x96,
904 CallWaitingTone = 0x99,
905 ConfirmationTone1 = 0x9A,
906 ConfirmationTone2 = 0x9B,
908 OutsideRingback = 0x9D,
921 PhoneKeyPound = 0xBB,