HidUsageTables.cs
author sl
Sat, 06 Dec 2014 22:59:55 +0100
changeset 28 6af1cbb3beb4
parent 27 305d2ecd3b1a
child 30 8ce9bdc9c5b5
permissions -rw-r--r--
HID Usage Tables fixes.
     1 //
     2 //
     3 //
     4 
     5 namespace Hid
     6 {
     7     /// <summary>
     8     /// From USB HID usage tables.
     9     /// http://www.usb.org/developers/hidpage#HID_Usage
    10     /// http://www.usb.org/developers/devclass_docs/Hut1_12v2.pdf
    11     /// </summary>
    12     public enum UsagePage : ushort
    13     {
    14         Undefined = 0,
    15         GenericDesktopControls,
    16         SimulationControls,
    17         VirtualRealityControls,
    18         SportControls,
    19         GameControls,
    20         GenericDeviceControls,
    21         Keyboard,
    22         LightEmittingDiode,
    23         Button,
    24         Ordinal,
    25         Telephony,
    26         Consumer,
    27         Digitiser,
    28         PhysicalInterfaceDevice = 0x0f,
    29         Unicode = 0x10,
    30         AlphaNumericDisplay = 0x14,
    31         MedicalInstruments = 0x40,
    32         MonitorPage0 = 0x80,
    33         MonitorPage1,
    34         MonitorPage2,
    35         MonitorPage3,
    36         PowerPage0,
    37         PowerPage1,
    38         PowerPage2,
    39         PowerPage3,
    40         BarCodeScanner = 0x8c,
    41         Scale,
    42         MagneticStripeReader,
    43         ReservedPointOfSale,
    44         CameraControl,
    45         Arcade,
    46         // http://msdn.microsoft.com/en-us/library/windows/desktop/bb417079.aspx
    47         MceRemote = 0xffbc,
    48         TerraTecRemote = 0xffcc
    49     }
    50 
    51     public enum UsageCollectionGenericDesktop : ushort
    52     {      
    53         Pointer = 0x01,
    54         Mouse = 0x02,
    55         Joystick = 0x04,
    56         GamePad = 0x05,
    57         Keyboard = 0x06,
    58         KeyPad = 0x07,
    59         MultiAxisController = 0x08,
    60         TabletPCSystemControls = 0x09,
    61         SystemControl = 0x80
    62     }
    63 
    64     public enum UsageCollectionConsumer : ushort
    65     {
    66         ConsumerControl = 0x01,
    67         NumericKeyPad = 0x02,
    68         ProgrammableButtons = 0x03,
    69         Microphone = 0x04,
    70         Headphone = 0x05,
    71         GraphicEqualizer = 0x06,
    72         FunctionButtons = 0x36,
    73         Selection = 0x80,
    74         MediaSelection = 0x0087,
    75         SelectDisc = 0x00BA,
    76         PlaybackSpeed = 0x00F1,
    77         Proximity = 0x0109,
    78         SpeakerSystem = 0x0160,
    79         ChannelLeft = 0x0161,
    80         ChannelRight = 0x0162,
    81         ChannelCenter = 0x0163,
    82         ChannelFront = 0x0164,
    83         ChannelCenterFront = 0x0165,
    84         ChannelSide = 0x0166,
    85         ChannelSurrond = 0x0167,
    86         ChannelLowFrequencyEnhancement = 0x0168,
    87         ChannelTop = 0x0169,
    88         ChannelUnknown = 0x016A,
    89         ApplicationLaunchButtons = 0x016A,
    90         GenericGuiApplicationControls = 0x0200,
    91     }
    92 
    93     
    94     public enum UsageIdMce: ushort
    95     {
    96         MceRemote = 0x88        
    97     }
    98 
    99 
   100 
   101     namespace UsageTables
   102     {
   103         /// <summary>
   104         ///
   105         /// </summary>
   106         public enum MceButton: ushort
   107         {
   108             /// <summary>
   109             /// Not defined by the Microsoft specs.
   110             /// </summary>
   111             Null                    =   0x00,
   112             GreenStart              =   0x0D,
   113             ClosedCaptioning        =   0x2B,
   114             Teletext                =   0x5A,
   115             TeletextRed             =   0x5B,
   116             TeletextGreen           =   0x5C,
   117             TeletextYellow          =   0x5D,
   118             TeletextBlue            =   0x5E,
   119             LiveTv                  =   0x25,
   120             Music                   =   0x47,
   121             RecordedTv              =   0x48,
   122             Pictures                =   0x49,
   123             Videos                  =   0x4A,
   124             FmRadio                 =   0x50,
   125             Extras                  =   0x3C,
   126             ExtrasApp               =   0x3D,
   127             DvdMenu                 =   0x24,
   128             DvdAngle                =   0x4B,
   129             DvdAudio                =   0x4C,
   130             DvdSubtitle             =   0x4D,
   131             /// <summary>
   132             /// First press action: Ejects a DVD drive.
   133             /// <para />
   134             /// Second press action: Repeats first press action.
   135             /// <para />
   136             /// Notably issued by XBOX360 remote as defined in irplus - Remote Control - Android application.
   137             /// </summary>
   138             Eject                   =   0x28,
   139             DvdTopMenu              =   0x43,
   140             /// <summary>
   141             /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
   142             /// Collection (page 0xFFBC, usage 0x88).
   143             /// <para />
   144             /// Second press action: Repeats message.
   145             /// <para />
   146             /// Auto-repeat: No
   147             /// <para />
   148             /// Notably sent by the 'Visualization' button of HP Windows Media Center Remote (TSGH-IR08).
   149             /// <para />
   150             /// According to HP specs it displays visual imagery that is synchronized to the sound of your music tracks.
   151             /// </summary>
   152             Ext0                    =   0x32,
   153             /// <summary>
   154             /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
   155             /// Collection (page 0xFFBC, usage 0x88).
   156             /// <para />
   157             /// Second press action: Repeats message.
   158             /// <para />
   159             /// Auto-repeat: No
   160             /// <para />
   161             /// Notably sent by the 'Slide Show' button of HP Windows Media Center Remote (TSGH-IR08).
   162             /// <para />
   163             /// According to HP specs it plays a slide show of all the pictures on your hard disk drive.
   164             /// </summary>
   165             Ext1                    =   0x33,
   166             /// <summary>
   167             /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
   168             /// Collection (page 0xFFBC, usage 0x88).
   169             /// <para />
   170             /// Second press action: Repeats message.
   171             /// <para />
   172             /// Auto-repeat: No
   173             /// <para />
   174             /// Notably sent by the 'Eject' button of HP Windows Media Center Remote (TSGH-IR08).
   175             /// Also interpreted as 'Eject' action by SoundGraph iMON Manager in MCE mode (OrigenAE VF310).
   176             /// </summary>
   177             Ext2                    =   0x34,
   178             /// <summary>
   179             /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
   180             /// Collection (page 0xFFBC, usage 0x88).
   181             /// <para />
   182             /// Second press action: Repeats message.
   183             /// <para />
   184             /// Auto-repeat: No
   185             /// <para />
   186             /// Notably sent by the 'Input selection' button of HP Windows Media Center Remote (TSGH-IR08).
   187             /// </summary>
   188             Ext3                    =   0x35,
   189             Ext4                    =   0x36,
   190             Ext5                    =   0x37,
   191             Ext6                    =   0x38,
   192             Ext7                    =   0x39,
   193             Ext8                    =   0x3A,
   194             Ext9                    =   0x80,
   195             Ext10                   =   0x81,
   196             Ext11                   =   0x6F,
   197             Zoom                    =   0x27,
   198             ChannelInput            =   0x42,
   199             SubAudio                =   0x2D,
   200             Channel10               =   0x3E,
   201             Channel11               =   0x3F,
   202             Channel12               =   0x40,
   203             /// <summary>
   204             /// First press action: Generates OEM2 HID message in the Media Center Vendor Specific
   205             /// Collection. This button is intended to control the front panel display of home entertainment
   206             /// computers. When this button is pressed, the display could be turned on or off, or the display
   207             /// mode could change.
   208             /// <para />
   209             /// Second press action: Repeats message.
   210             /// <para />
   211             /// Auto-repeat: No
   212             /// <para />
   213             /// Notably issued by XBOX360 remote as defined in irplus - Remote Control - Android application.
   214             /// </summary>
   215             Display                 =   0x4F,
   216             /// <summary>
   217             /// First press action: To be determined.
   218             /// <para />
   219             /// Second press action: Repeats message.
   220             /// <para />
   221             /// Auto-repeat: No
   222             /// </summary>
   223             Kiosk                   =   0x6A,
   224             NetworkSelection        =   0x2C,
   225             BlueRayTool             =   0x78,
   226             ChannelInfo             =   0x41,
   227             VideoSelection          =   0x61
   228         }
   229 
   230         /// <summary>
   231         /// Those codes come from experimenting with HP remotes.
   232         /// </summary>
   233         public enum HpMceButton: ushort
   234         {
   235             /// <summary>
   236             /// Displays visual imagery that is synchronized to the sound of your music tracks.
   237             /// <para />
   238             /// Second press action: Repeats message.
   239             /// <para />
   240             /// Auto-repeat: No
   241             /// <para />
   242             /// Notably sent by the 'Visualization' button of HP Windows Media Center Remote (TSGH-IR08).
   243             /// <para />
   244             /// According to HP specs it displays visual imagery that is synchronized to the sound of your music tracks.
   245             /// </summary>
   246             Visualization = MceButton.Ext0,
   247             /// <summary>
   248             /// Plays a slide show of all the pictures on your hard disk drive.
   249             /// <para />
   250             /// Second press action: Repeats message.
   251             /// <para />
   252             /// Auto-repeat: No
   253             /// <para />
   254             /// Notably sent by the 'Slide Show' button of HP Windows Media Center Remote (TSGH-IR08).
   255             /// <para />
   256             /// According to HP specs it plays a slide show of all the pictures on your hard disk drive.
   257             /// </summary>
   258             SlideShow = MceButton.Ext1,
   259             /// <summary>
   260             /// Eject optical drive.
   261             /// <para />
   262             /// Second press action: Repeats message.
   263             /// <para />
   264             /// Auto-repeat: No
   265             /// <para />
   266             /// Notably sent by the 'Eject' button of HP Windows Media Center Remote (TSGH-IR08).
   267             /// Also interpreted as 'Eject' action by SoundGraph iMON Manager in MCE mode (OrigenAE VF310).
   268             /// </summary>
   269             Eject = MceButton.Ext2,
   270             /// <summary>
   271             /// Not sure what this should do.
   272             /// <para />
   273             /// Second press action: Repeats message.
   274             /// <para />
   275             /// Auto-repeat: No
   276             /// <para />
   277             /// Notably sent by the 'Input selection' button of HP Windows Media Center Remote (TSGH-IR08).
   278             /// </summary>
   279             InputSelection = MceButton.Ext3,
   280         }
   281 
   282         /// <summary>
   283         /// Usage Table for Consumer Controls
   284         /// 0x0C 0X01
   285         /// </summary>
   286         public enum ConsumerControl: ushort
   287         {
   288             Null = 0x0000,           
   289             //           
   290             Channel = 0x0086,
   291             MediaSelectComputer = 0x0088,
   292             MediaSelectTV = 0x0089,
   293             MediaSelectWWW = 0x008A,
   294             MediaSelectDVD = 0x008B,
   295             MediaSelectTelephone = 0x008C,
   296             MediaSelectProgramGuide = 0x008D,
   297             MediaSelectVideoPhone = 0x008E,
   298             MediaSelectGames = 0x008F,
   299             MediaSelectMessages = 0x0090,
   300             MediaSelectCD = 0x0091,
   301             MediaSelectVCR = 0x0092,
   302             MediaSelectTuner = 0x0093,
   303             Quit = 0x0094,
   304             Help = 0x0095,
   305             MediaSelectTape = 0x0096,
   306             MediaSelectCable = 0x0097,
   307             MediaSelectSatellite = 0x0098,
   308             MediaSelectSecurity = 0x0099,
   309             MediaSelectHome = 0x009A,
   310             MediaSelectCall = 0x009B,
   311             ChannelIncrement = 0x009C,
   312             ChannelDecrement = 0x009D,
   313             MediaSelectSAP = 0x009E,
   314             //
   315             Play = 0x00B0,
   316             Pause = 0x00B1,
   317             Record = 0x00B2,
   318             FastForward = 0x00B3,
   319             Rewind = 0x00B4,
   320             ScanNextTrack = 0x00B5,
   321             ScanPreviousTrack = 0x00B6,
   322             Stop = 0x00B7,
   323             Eject = 0x00B8,
   324             RandomPlay = 0x00B9,            
   325             EnterDisc = 0x00BB,
   326             Repeat = 0x00BC,
   327             Tracking = 0x00BD,
   328             TrackNormal = 0x00BE,
   329             SlowTracking = 0x00BF,
   330             FrameForward = 0x00C0,
   331             FrameBack = 0x00C1,
   332             Mark = 0x00C2,
   333             ClearMark = 0x00C3,
   334             RepeatFromMark = 0x00C4,
   335             ReturnToMark = 0x00C5,
   336             SearchMarkForward = 0x00C6,
   337             SearchMarkBackwards = 0x00C7,
   338             CounterReset = 0x00C8,
   339             ShowCounter = 0x00C9,
   340             TrackingIncrement = 0x00CA,
   341             TrackingDecrement = 0x00CB,
   342             StopEject = 0x00CC,
   343             PlayPause = 0x00CD,
   344             PlaySkip = 0x00CE,
   345 
   346             /// <summary>
   347             /// Audio controls
   348             /// </summary>
   349             Volume = 0x00E0,
   350             Balance = 0x00E1,
   351             Mute = 0x00E2,
   352             Bass = 0x00E3,
   353             Treble = 0x00E4,
   354             BassBoost = 0x00E5,
   355             SurroundMode = 0x00E6,
   356             Loudness = 0x00E7,
   357             MPX = 0x00E8,
   358             VolumeIncrement = 0x00E9,
   359             VolumeDecrement = 0x00EA,
   360 
   361             //Generic GUI Application Controls
   362             //GenericGUIApplicationControls = 0x0200,
   363             AppCtrlNew = 0x0201,
   364             AppCtrlOpen = 0x0202,
   365             AppCtrlClose = 0x0203,
   366             AppCtrlExit = 0x0204,
   367             AppCtrlMaximize = 0x0205,
   368             AppCtrlMinimize = 0x0206,
   369             AppCtrlSave = 0x0207,
   370             AppCtrlPrint = 0x0208,
   371             AppCtrlProperties = 0x0209,
   372             AppCtrlUndo = 0x021A,
   373             AppCtrlCopy = 0x021B,
   374             AppCtrlCut = 0x021C,
   375             AppCtrlPaste = 0x021D,
   376             AppCtrlSelectAll = 0x021E,
   377             AppCtrlFind = 0x021F,
   378             AppCtrlFindAndReplace = 0x0220,
   379             AppCtrlSearch = 0x0221,
   380             AppCtrlGoTo = 0x0222,
   381             AppCtrlHome = 0x0223,
   382             AppCtrlBack = 0x0224,
   383             AppCtrlForward = 0x0225,
   384             AppCtrlStop = 0x0226,
   385             AppCtrlRefresh = 0x0227,
   386             AppCtrlPreviousLink = 0x0228,
   387             AppCtrlNextLink = 0x0229,
   388             AppCtrlBookmarks = 0x022A,
   389             AppCtrlHistory = 0x022B,
   390             AppCtrlSubscriptions = 0x022C,
   391             AppCtrlZoomIn = 0x022D,
   392             AppCtrlZoomOut = 0x022E,
   393             AppCtrlZoom = 0x022F,
   394             AppCtrlFullScreenView = 0x0230,
   395             AppCtrlNormalView = 0x0231,
   396             AppCtrlViewToggle = 0x0232,
   397             AppCtrlScrollUp = 0x0233,
   398             AppCtrlScrollDown = 0x0234,
   399             AppCtrlScroll = 0x0235,
   400             AppCtrlPanLeft = 0x0236,
   401             AppCtrlPanRight = 0x0237,
   402             AppCtrlPan = 0x0238,
   403             AppCtrlNewWindow = 0x0239,
   404             AppCtrlTileHorizontally = 0x023A,
   405             AppCtrlTileVertically = 0x023B,
   406             AppCtrlFormat = 0x023C,
   407             AppCtrlEdit = 0x023D,
   408         }
   409     }
   410 }