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