HumanInterfaceDevice.cs
author sl
Wed, 03 Dec 2014 21:54:45 +0100
changeset 16 9a3e77655031
parent 11 2ff6dbe0d356
child 18 24ac84ab9620
permissions -rw-r--r--
Now supporting alternative codes for program guid and properties/info.
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@8
    15
        GenericDesktopControl,
sl@8
    16
        SimulationControl,
sl@8
    17
        VirtualRealityControl,
sl@8
    18
        SportControl,
sl@8
    19
        GameControl,
sl@8
    20
        GenericDeviceControl,
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@8
    51
    /// <summary>
sl@8
    52
/// 
sl@8
    53
/// </summary>
sl@8
    54
    public enum UsageId: ushort
sl@8
    55
    {
sl@8
    56
        MceRemoteUsage = 0x88,
sl@8
    57
        ConsumerControl = 0x01
sl@8
    58
    }
sl@8
    59
sl@8
    60
sl@8
    61
sl@8
    62
    namespace UsageTables
sl@8
    63
    {
sl@8
    64
        /// <summary>
sl@8
    65
        ///
sl@8
    66
        /// </summary>
sl@11
    67
        public enum MceButton: ushort
sl@8
    68
        {
sl@8
    69
            /// <summary>
sl@8
    70
            /// Not defined by the Microsoft specs.
sl@8
    71
            /// </summary>
sl@8
    72
            Null                    =   0x00,
sl@8
    73
            GreenStart              =   0x0D,
sl@8
    74
            ClosedCaptioning        =   0x2B,
sl@8
    75
            Teletext                =   0x5A,
sl@8
    76
            TeletextRed             =   0x5B,
sl@8
    77
            TeletextGreen           =   0x5C,
sl@8
    78
            TeletextYellow          =   0x5D,
sl@8
    79
            TeletextBlue            =   0x5E,
sl@8
    80
            LiveTv                  =   0x25,
sl@8
    81
            Music                   =   0x47,
sl@8
    82
            RecordedTv              =   0x48,
sl@8
    83
            Pictures                =   0x49,
sl@8
    84
            Videos                  =   0x4A,
sl@8
    85
            FmRadio                 =   0x50,
sl@8
    86
            Extras                  =   0x3C,
sl@8
    87
            ExtrasApp               =   0x3D,
sl@8
    88
            DvdMenu                 =   0x24,
sl@8
    89
            DvdAngle                =   0x4B,
sl@8
    90
            DvdAudio                =   0x4C,
sl@8
    91
            DvdSubtitle             =   0x4D,
sl@8
    92
            /// <summary>
sl@8
    93
            /// First press action: Ejects a DVD drive.
sl@8
    94
            /// <para />
sl@8
    95
            /// Second press action: Repeats first press action.
sl@8
    96
            /// <para />
sl@8
    97
            /// Notably issued by XBOX360 remote as defined in irplus - Remote Control - Android application.
sl@8
    98
            /// </summary>
sl@8
    99
            Eject                   =   0x28,
sl@8
   100
            DvdTopMenu              =   0x43,
sl@8
   101
            /// <summary>
sl@8
   102
            /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
sl@8
   103
            /// Collection (page 0xFFBC, usage 0x88).
sl@8
   104
            /// <para />
sl@8
   105
            /// Second press action: Repeats message.
sl@8
   106
            /// <para />
sl@8
   107
            /// Auto-repeat: No
sl@8
   108
            /// <para />
sl@8
   109
            /// Notably sent by the 'Visualization' button of HP Windows Media Center Remote (TSGH-IR08).
sl@8
   110
            /// <para />
sl@8
   111
            /// According to HP specs it displays visual imagery that is synchronized to the sound of your music tracks.
sl@8
   112
            /// </summary>
sl@8
   113
            Ext0                    =   0x32,
sl@8
   114
            /// <summary>
sl@8
   115
            /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
sl@8
   116
            /// Collection (page 0xFFBC, usage 0x88).
sl@8
   117
            /// <para />
sl@8
   118
            /// Second press action: Repeats message.
sl@8
   119
            /// <para />
sl@8
   120
            /// Auto-repeat: No
sl@8
   121
            /// <para />
sl@8
   122
            /// Notably sent by the 'Slide Show' button of HP Windows Media Center Remote (TSGH-IR08).
sl@8
   123
            /// <para />
sl@8
   124
            /// According to HP specs it plays a slide show of all the pictures on your hard disk drive.
sl@8
   125
            /// </summary>
sl@8
   126
            Ext1                    =   0x33,
sl@8
   127
            /// <summary>
sl@8
   128
            /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
sl@8
   129
            /// Collection (page 0xFFBC, usage 0x88).
sl@8
   130
            /// <para />
sl@8
   131
            /// Second press action: Repeats message.
sl@8
   132
            /// <para />
sl@8
   133
            /// Auto-repeat: No
sl@8
   134
            /// <para />
sl@8
   135
            /// Notably sent by the 'Eject' button of HP Windows Media Center Remote (TSGH-IR08).
sl@8
   136
            /// Also interpreted as 'Eject' action by SoundGraph iMON Manager in MCE mode (OrigenAE VF310).
sl@8
   137
            /// </summary>
sl@8
   138
            Ext2                    =   0x34,
sl@8
   139
            /// <summary>
sl@8
   140
            /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
sl@8
   141
            /// Collection (page 0xFFBC, usage 0x88).
sl@8
   142
            /// <para />
sl@8
   143
            /// Second press action: Repeats message.
sl@8
   144
            /// <para />
sl@8
   145
            /// Auto-repeat: No
sl@8
   146
            /// <para />
sl@8
   147
            /// Notably sent by the 'Input selection' button of HP Windows Media Center Remote (TSGH-IR08).
sl@8
   148
            /// </summary>
sl@8
   149
            Ext3                    =   0x35,
sl@8
   150
            Ext4                    =   0x36,
sl@8
   151
            Ext5                    =   0x37,
sl@8
   152
            Ext6                    =   0x38,
sl@8
   153
            Ext7                    =   0x39,
sl@8
   154
            Ext8                    =   0x3A,
sl@8
   155
            Ext9                    =   0x80,
sl@8
   156
            Ext10                   =   0x81,
sl@8
   157
            Ext11                   =   0x6F,
sl@8
   158
            Zoom                    =   0x27,
sl@8
   159
            ChannelInput            =   0x42,
sl@8
   160
            SubAudio                =   0x2D,
sl@8
   161
            Channel10               =   0x3E,
sl@8
   162
            Channel11               =   0x3F,
sl@8
   163
            Channel12               =   0x40,
sl@8
   164
            /// <summary>
sl@8
   165
            /// First press action: Generates OEM2 HID message in the Media Center Vendor Specific
sl@8
   166
            /// Collection. This button is intended to control the front panel display of home entertainment
sl@8
   167
            /// computers. When this button is pressed, the display could be turned on or off, or the display
sl@8
   168
            /// mode could change.
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 issued by XBOX360 remote as defined in irplus - Remote Control - Android application.
sl@8
   175
            /// </summary>
sl@8
   176
            Display                 =   0x4F,
sl@8
   177
            /// <summary>
sl@8
   178
            /// First press action: To be determined.
sl@8
   179
            /// <para />
sl@8
   180
            /// Second press action: Repeats message.
sl@8
   181
            /// <para />
sl@8
   182
            /// Auto-repeat: No
sl@8
   183
            /// </summary>
sl@8
   184
            Kiosk                   =   0x6A,
sl@8
   185
            NetworkSelection        =   0x2C,
sl@8
   186
            BlueRayTool             =   0x78,
sl@8
   187
            ChannelInfo             =   0x41,
sl@8
   188
            VideoSelection          =   0x61
sl@8
   189
        }
sl@8
   190
sl@11
   191
        /// <summary>
sl@11
   192
        /// Those codes come from experimenting with HP remotes.
sl@11
   193
        /// </summary>
sl@8
   194
        public enum HpMceButton: ushort
sl@8
   195
        {
sl@8
   196
            /// <summary>
sl@8
   197
            /// Displays visual imagery that is synchronized to the sound of your music tracks.
sl@8
   198
            /// <para />
sl@8
   199
            /// Second press action: Repeats message.
sl@8
   200
            /// <para />
sl@8
   201
            /// Auto-repeat: No
sl@8
   202
            /// <para />
sl@8
   203
            /// Notably sent by the 'Visualization' button of HP Windows Media Center Remote (TSGH-IR08).
sl@8
   204
            /// <para />
sl@8
   205
            /// According to HP specs it displays visual imagery that is synchronized to the sound of your music tracks.
sl@8
   206
            /// </summary>
sl@8
   207
            Visualization = MceButton.Ext0,
sl@8
   208
            /// <summary>
sl@8
   209
            /// Plays a slide show of all the pictures on your hard disk drive.
sl@8
   210
            /// <para />
sl@8
   211
            /// Second press action: Repeats message.
sl@8
   212
            /// <para />
sl@8
   213
            /// Auto-repeat: No
sl@8
   214
            /// <para />
sl@8
   215
            /// Notably sent by the 'Slide Show' button of HP Windows Media Center Remote (TSGH-IR08).
sl@8
   216
            /// <para />
sl@8
   217
            /// According to HP specs it plays a slide show of all the pictures on your hard disk drive.
sl@8
   218
            /// </summary>
sl@8
   219
            SlideShow = MceButton.Ext1,
sl@8
   220
            /// <summary>
sl@8
   221
            /// Eject optical drive.
sl@8
   222
            /// <para />
sl@8
   223
            /// Second press action: Repeats message.
sl@8
   224
            /// <para />
sl@8
   225
            /// Auto-repeat: No
sl@8
   226
            /// <para />
sl@8
   227
            /// Notably sent by the 'Eject' button of HP Windows Media Center Remote (TSGH-IR08).
sl@8
   228
            /// Also interpreted as 'Eject' action by SoundGraph iMON Manager in MCE mode (OrigenAE VF310).
sl@8
   229
            /// </summary>
sl@8
   230
            Eject = MceButton.Ext2,
sl@8
   231
            /// <summary>
sl@8
   232
            /// Not sure what this should do.
sl@8
   233
            /// <para />
sl@8
   234
            /// Second press action: Repeats message.
sl@8
   235
            /// <para />
sl@8
   236
            /// Auto-repeat: No
sl@8
   237
            /// <para />
sl@8
   238
            /// Notably sent by the 'Input selection' button of HP Windows Media Center Remote (TSGH-IR08).
sl@8
   239
            /// </summary>
sl@8
   240
            InputSelection = MceButton.Ext3,
sl@8
   241
        }
sl@8
   242
sl@8
   243
        /// <summary>
sl@8
   244
        /// Usage Table for Consumer Controls
sl@8
   245
        /// 0x0C 0X01
sl@8
   246
        /// </summary>
sl@8
   247
        public enum ConsumerControl: ushort
sl@8
   248
        {
sl@8
   249
            /// <summary>
sl@16
   250
            /// Alternative code for properties.
sl@16
   251
            /// Also supported by Windows Media Center.
sl@16
   252
            /// </summary>
sl@16
   253
            MceProperties = 0x000A,
sl@16
   254
            /// <summary>
sl@16
   255
            /// Alternative code for program guide.
sl@16
   256
            /// Also supported by Windows Media Center.
sl@16
   257
            /// </summary>
sl@16
   258
            MceProgramGuide = 0x0012,
sl@16
   259
            /// <summary>
sl@8
   260
            /// Sent by MCE remotes.
sl@8
   261
            /// </summary>
sl@8
   262
            MediaSelectProgramGuide = 0x008D,
sl@8
   263
            /// <summary>
sl@8
   264
            /// Sent by MCE remotes.
sl@8
   265
            /// </summary>
sl@8
   266
            AppCtrlPrint = 0x0208,
sl@8
   267
            /// <summary>
sl@8
   268
            /// Sent by MCE remotes from the 'I' Informations or More Info buttons.
sl@8
   269
            /// </summary>
sl@8
   270
            AppCtrlProperties = 0x0209            
sl@8
   271
        }
sl@8
   272
    }
sl@8
   273
}