HidUsageTables.cs
changeset 27 305d2ecd3b1a
parent 25 5f4e0fbb3ea1
child 28 6af1cbb3beb4
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/HidUsageTables.cs	Sat Dec 06 21:52:45 2014 +0100
     1.3 @@ -0,0 +1,394 @@
     1.4 +//
     1.5 +//
     1.6 +//
     1.7 +
     1.8 +namespace Hid
     1.9 +{
    1.10 +    /// <summary>
    1.11 +    /// From USB HID usage tables.
    1.12 +    /// http://www.usb.org/developers/hidpage#HID_Usage
    1.13 +    /// http://www.usb.org/developers/devclass_docs/Hut1_12v2.pdf
    1.14 +    /// </summary>
    1.15 +    public enum UsagePage : ushort
    1.16 +    {
    1.17 +        Undefined = 0,
    1.18 +        GenericDesktopControl,
    1.19 +        SimulationControl,
    1.20 +        VirtualRealityControl,
    1.21 +        SportControl,
    1.22 +        GameControl,
    1.23 +        GenericDeviceControl,
    1.24 +        Keyboard,
    1.25 +        LightEmittingDiode,
    1.26 +        Button,
    1.27 +        Ordinal,
    1.28 +        Telephony,
    1.29 +        Consumer,
    1.30 +        Digitiser,
    1.31 +        PhysicalInterfaceDevice = 0x0f,
    1.32 +        Unicode = 0x10,
    1.33 +        AlphaNumericDisplay = 0x14,
    1.34 +        MedicalInstruments = 0x40,
    1.35 +        MonitorPage0 = 0x80,
    1.36 +        MonitorPage1,
    1.37 +        MonitorPage2,
    1.38 +        MonitorPage3,
    1.39 +        PowerPage0,
    1.40 +        PowerPage1,
    1.41 +        PowerPage2,
    1.42 +        PowerPage3,
    1.43 +        BarCodeScanner = 0x8c,
    1.44 +        Scale,
    1.45 +        MagneticStripeReader,
    1.46 +        ReservedPointOfSale,
    1.47 +        CameraControl,
    1.48 +        Arcade,
    1.49 +        // http://msdn.microsoft.com/en-us/library/windows/desktop/bb417079.aspx
    1.50 +        MceRemote = 0xffbc,
    1.51 +        TerraTecRemote = 0xffcc
    1.52 +    }
    1.53 +
    1.54 +    public enum UsageIdGenericDesktop : ushort
    1.55 +    {      
    1.56 +        Pointer = 0x01,
    1.57 +        Mouse = 0x02,
    1.58 +        Joystick = 0x04,
    1.59 +        GamePad = 0x05,
    1.60 +        Keyboard = 0x06,
    1.61 +        KeyPad = 0x07,
    1.62 +        MultiAxisController = 0x08,
    1.63 +        TabletPCSystemControls = 0x09,
    1.64 +        SystemControl = 0x80
    1.65 +    }
    1.66 +
    1.67 +    public enum UsageIdConsumer : ushort
    1.68 +    {
    1.69 +        ConsumerControl = 0x01,
    1.70 +        NumericKeyPad = 0x02,
    1.71 +        ProgrammableButtons = 0x03,
    1.72 +        Microphone = 0x04,
    1.73 +        Headphone = 0x05,
    1.74 +        GraphicEqualizer = 0x06,
    1.75 +        Selection = 0x80,
    1.76 +    }
    1.77 +
    1.78 +    
    1.79 +    public enum UsageIdMce: ushort
    1.80 +    {
    1.81 +        MceRemote = 0x88        
    1.82 +    }
    1.83 +
    1.84 +
    1.85 +
    1.86 +    namespace UsageTables
    1.87 +    {
    1.88 +        /// <summary>
    1.89 +        ///
    1.90 +        /// </summary>
    1.91 +        public enum MceButton: ushort
    1.92 +        {
    1.93 +            /// <summary>
    1.94 +            /// Not defined by the Microsoft specs.
    1.95 +            /// </summary>
    1.96 +            Null                    =   0x00,
    1.97 +            GreenStart              =   0x0D,
    1.98 +            ClosedCaptioning        =   0x2B,
    1.99 +            Teletext                =   0x5A,
   1.100 +            TeletextRed             =   0x5B,
   1.101 +            TeletextGreen           =   0x5C,
   1.102 +            TeletextYellow          =   0x5D,
   1.103 +            TeletextBlue            =   0x5E,
   1.104 +            LiveTv                  =   0x25,
   1.105 +            Music                   =   0x47,
   1.106 +            RecordedTv              =   0x48,
   1.107 +            Pictures                =   0x49,
   1.108 +            Videos                  =   0x4A,
   1.109 +            FmRadio                 =   0x50,
   1.110 +            Extras                  =   0x3C,
   1.111 +            ExtrasApp               =   0x3D,
   1.112 +            DvdMenu                 =   0x24,
   1.113 +            DvdAngle                =   0x4B,
   1.114 +            DvdAudio                =   0x4C,
   1.115 +            DvdSubtitle             =   0x4D,
   1.116 +            /// <summary>
   1.117 +            /// First press action: Ejects a DVD drive.
   1.118 +            /// <para />
   1.119 +            /// Second press action: Repeats first press action.
   1.120 +            /// <para />
   1.121 +            /// Notably issued by XBOX360 remote as defined in irplus - Remote Control - Android application.
   1.122 +            /// </summary>
   1.123 +            Eject                   =   0x28,
   1.124 +            DvdTopMenu              =   0x43,
   1.125 +            /// <summary>
   1.126 +            /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
   1.127 +            /// Collection (page 0xFFBC, usage 0x88).
   1.128 +            /// <para />
   1.129 +            /// Second press action: Repeats message.
   1.130 +            /// <para />
   1.131 +            /// Auto-repeat: No
   1.132 +            /// <para />
   1.133 +            /// Notably sent by the 'Visualization' button of HP Windows Media Center Remote (TSGH-IR08).
   1.134 +            /// <para />
   1.135 +            /// According to HP specs it displays visual imagery that is synchronized to the sound of your music tracks.
   1.136 +            /// </summary>
   1.137 +            Ext0                    =   0x32,
   1.138 +            /// <summary>
   1.139 +            /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
   1.140 +            /// Collection (page 0xFFBC, usage 0x88).
   1.141 +            /// <para />
   1.142 +            /// Second press action: Repeats message.
   1.143 +            /// <para />
   1.144 +            /// Auto-repeat: No
   1.145 +            /// <para />
   1.146 +            /// Notably sent by the 'Slide Show' button of HP Windows Media Center Remote (TSGH-IR08).
   1.147 +            /// <para />
   1.148 +            /// According to HP specs it plays a slide show of all the pictures on your hard disk drive.
   1.149 +            /// </summary>
   1.150 +            Ext1                    =   0x33,
   1.151 +            /// <summary>
   1.152 +            /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
   1.153 +            /// Collection (page 0xFFBC, usage 0x88).
   1.154 +            /// <para />
   1.155 +            /// Second press action: Repeats message.
   1.156 +            /// <para />
   1.157 +            /// Auto-repeat: No
   1.158 +            /// <para />
   1.159 +            /// Notably sent by the 'Eject' button of HP Windows Media Center Remote (TSGH-IR08).
   1.160 +            /// Also interpreted as 'Eject' action by SoundGraph iMON Manager in MCE mode (OrigenAE VF310).
   1.161 +            /// </summary>
   1.162 +            Ext2                    =   0x34,
   1.163 +            /// <summary>
   1.164 +            /// First press action: Generates EXTn HID message in the Media Center Vendor Specific
   1.165 +            /// Collection (page 0xFFBC, usage 0x88).
   1.166 +            /// <para />
   1.167 +            /// Second press action: Repeats message.
   1.168 +            /// <para />
   1.169 +            /// Auto-repeat: No
   1.170 +            /// <para />
   1.171 +            /// Notably sent by the 'Input selection' button of HP Windows Media Center Remote (TSGH-IR08).
   1.172 +            /// </summary>
   1.173 +            Ext3                    =   0x35,
   1.174 +            Ext4                    =   0x36,
   1.175 +            Ext5                    =   0x37,
   1.176 +            Ext6                    =   0x38,
   1.177 +            Ext7                    =   0x39,
   1.178 +            Ext8                    =   0x3A,
   1.179 +            Ext9                    =   0x80,
   1.180 +            Ext10                   =   0x81,
   1.181 +            Ext11                   =   0x6F,
   1.182 +            Zoom                    =   0x27,
   1.183 +            ChannelInput            =   0x42,
   1.184 +            SubAudio                =   0x2D,
   1.185 +            Channel10               =   0x3E,
   1.186 +            Channel11               =   0x3F,
   1.187 +            Channel12               =   0x40,
   1.188 +            /// <summary>
   1.189 +            /// First press action: Generates OEM2 HID message in the Media Center Vendor Specific
   1.190 +            /// Collection. This button is intended to control the front panel display of home entertainment
   1.191 +            /// computers. When this button is pressed, the display could be turned on or off, or the display
   1.192 +            /// mode could change.
   1.193 +            /// <para />
   1.194 +            /// Second press action: Repeats message.
   1.195 +            /// <para />
   1.196 +            /// Auto-repeat: No
   1.197 +            /// <para />
   1.198 +            /// Notably issued by XBOX360 remote as defined in irplus - Remote Control - Android application.
   1.199 +            /// </summary>
   1.200 +            Display                 =   0x4F,
   1.201 +            /// <summary>
   1.202 +            /// First press action: To be determined.
   1.203 +            /// <para />
   1.204 +            /// Second press action: Repeats message.
   1.205 +            /// <para />
   1.206 +            /// Auto-repeat: No
   1.207 +            /// </summary>
   1.208 +            Kiosk                   =   0x6A,
   1.209 +            NetworkSelection        =   0x2C,
   1.210 +            BlueRayTool             =   0x78,
   1.211 +            ChannelInfo             =   0x41,
   1.212 +            VideoSelection          =   0x61
   1.213 +        }
   1.214 +
   1.215 +        /// <summary>
   1.216 +        /// Those codes come from experimenting with HP remotes.
   1.217 +        /// </summary>
   1.218 +        public enum HpMceButton: ushort
   1.219 +        {
   1.220 +            /// <summary>
   1.221 +            /// Displays visual imagery that is synchronized to the sound of your music tracks.
   1.222 +            /// <para />
   1.223 +            /// Second press action: Repeats message.
   1.224 +            /// <para />
   1.225 +            /// Auto-repeat: No
   1.226 +            /// <para />
   1.227 +            /// Notably sent by the 'Visualization' button of HP Windows Media Center Remote (TSGH-IR08).
   1.228 +            /// <para />
   1.229 +            /// According to HP specs it displays visual imagery that is synchronized to the sound of your music tracks.
   1.230 +            /// </summary>
   1.231 +            Visualization = MceButton.Ext0,
   1.232 +            /// <summary>
   1.233 +            /// Plays a slide show of all the pictures on your hard disk drive.
   1.234 +            /// <para />
   1.235 +            /// Second press action: Repeats message.
   1.236 +            /// <para />
   1.237 +            /// Auto-repeat: No
   1.238 +            /// <para />
   1.239 +            /// Notably sent by the 'Slide Show' button of HP Windows Media Center Remote (TSGH-IR08).
   1.240 +            /// <para />
   1.241 +            /// According to HP specs it plays a slide show of all the pictures on your hard disk drive.
   1.242 +            /// </summary>
   1.243 +            SlideShow = MceButton.Ext1,
   1.244 +            /// <summary>
   1.245 +            /// Eject optical drive.
   1.246 +            /// <para />
   1.247 +            /// Second press action: Repeats message.
   1.248 +            /// <para />
   1.249 +            /// Auto-repeat: No
   1.250 +            /// <para />
   1.251 +            /// Notably sent by the 'Eject' button of HP Windows Media Center Remote (TSGH-IR08).
   1.252 +            /// Also interpreted as 'Eject' action by SoundGraph iMON Manager in MCE mode (OrigenAE VF310).
   1.253 +            /// </summary>
   1.254 +            Eject = MceButton.Ext2,
   1.255 +            /// <summary>
   1.256 +            /// Not sure what this should do.
   1.257 +            /// <para />
   1.258 +            /// Second press action: Repeats message.
   1.259 +            /// <para />
   1.260 +            /// Auto-repeat: No
   1.261 +            /// <para />
   1.262 +            /// Notably sent by the 'Input selection' button of HP Windows Media Center Remote (TSGH-IR08).
   1.263 +            /// </summary>
   1.264 +            InputSelection = MceButton.Ext3,
   1.265 +        }
   1.266 +
   1.267 +        /// <summary>
   1.268 +        /// Usage Table for Consumer Controls
   1.269 +        /// 0x0C 0X01
   1.270 +        /// </summary>
   1.271 +        public enum ConsumerControl: ushort
   1.272 +        {
   1.273 +            Null = 0x0000,           
   1.274 +            //           
   1.275 +            Channel = 0x0086,
   1.276 +            MediaSelection = 0x0087,
   1.277 +            MediaSelectComputer = 0x0088,
   1.278 +            MediaSelectTV = 0x0089,
   1.279 +            MediaSelectWWW = 0x008A,
   1.280 +            MediaSelectDVD = 0x008B,
   1.281 +            MediaSelectTelephone = 0x008C,
   1.282 +            MediaSelectProgramGuide = 0x008D,
   1.283 +            MediaSelectVideoPhone = 0x008E,
   1.284 +            MediaSelectGames = 0x008F,
   1.285 +            MediaSelectMessages = 0x0090,
   1.286 +            MediaSelectCD = 0x0091,
   1.287 +            MediaSelectVCR = 0x0092,
   1.288 +            MediaSelectTuner = 0x0093,
   1.289 +            Quit = 0x0094,
   1.290 +            Help = 0x0095,
   1.291 +            MediaSelectTape = 0x0096,
   1.292 +            MediaSelectCable = 0x0097,
   1.293 +            MediaSelectSatellite = 0x0098,
   1.294 +            MediaSelectSecurity = 0x0099,
   1.295 +            MediaSelectHome = 0x009A,
   1.296 +            MediaSelectCall = 0x009B,
   1.297 +            ChannelIncrement = 0x009C,
   1.298 +            ChannelDecrement = 0x009D,
   1.299 +            MediaSelectSAP = 0x009E,
   1.300 +            //
   1.301 +            Play = 0x00B0,
   1.302 +            Pause = 0x00B1,
   1.303 +            Record = 0x00B2,
   1.304 +            FastForward = 0x00B3,
   1.305 +            Rewind = 0x00B4,
   1.306 +            ScanNextTrack = 0x00B5,
   1.307 +            ScanPreviousTrack = 0x00B6,
   1.308 +            Stop = 0x00B7,
   1.309 +            Eject = 0x00B8,
   1.310 +            RandomPlay = 0x00B9,
   1.311 +            SelectDisc = 0x00BA,
   1.312 +            EnterDisc = 0x00BB,
   1.313 +            Repeat = 0x00BC,
   1.314 +            Tracking = 0x00BD,
   1.315 +            TrackNormal = 0x00BE,
   1.316 +            SlowTracking = 0x00BF,
   1.317 +            FrameForward = 0x00C0,
   1.318 +            FrameBack = 0x00C1,
   1.319 +            Mark = 0x00C2,
   1.320 +            ClearMark = 0x00C3,
   1.321 +            RepeatFromMark = 0x00C4,
   1.322 +            ReturnToMark = 0x00C5,
   1.323 +            SearchMarkForward = 0x00C6,
   1.324 +            SearchMarkBackwards = 0x00C7,
   1.325 +            CounterReset = 0x00C8,
   1.326 +            ShowCounter = 0x00C9,
   1.327 +            TrackingIncrement = 0x00CA,
   1.328 +            TrackingDecrement = 0x00CB,
   1.329 +            StopEject = 0x00CC,
   1.330 +            PlayPause = 0x00CD,
   1.331 +            PlaySkip = 0x00CE,
   1.332 +
   1.333 +            /// <summary>
   1.334 +            /// Audio controls
   1.335 +            /// </summary>
   1.336 +            Volume = 0x00E0,
   1.337 +            Balance = 0x00E1,
   1.338 +            Mute = 0x00E2,
   1.339 +            Bass = 0x00E3,
   1.340 +            Treble = 0x00E4,
   1.341 +            BassBoost = 0x00E5,
   1.342 +            SurroundMode = 0x00E6,
   1.343 +            Loudness = 0x00E7,
   1.344 +            MPX = 0x00E8,
   1.345 +            VolumeIncrement = 0x00E9,
   1.346 +            VolumeDecrement = 0x00EA,
   1.347 +
   1.348 +            //Generic GUI Application Controls
   1.349 +            GenericGUIApplicationControls = 0x0200,
   1.350 +            AppCtrlNew = 0x0201,
   1.351 +            AppCtrlOpen = 0x0202,
   1.352 +            AppCtrlClose = 0x0203,
   1.353 +            AppCtrlExit = 0x0204,
   1.354 +            AppCtrlMaximize = 0x0205,
   1.355 +            AppCtrlMinimize = 0x0206,
   1.356 +            AppCtrlSave = 0x0207,
   1.357 +            AppCtrlPrint = 0x0208,
   1.358 +            AppCtrlProperties = 0x0209,
   1.359 +            AppCtrlUndo = 0x021A,
   1.360 +            AppCtrlCopy = 0x021B,
   1.361 +            AppCtrlCut = 0x021C,
   1.362 +            AppCtrlPaste = 0x021D,
   1.363 +            AppCtrlSelectAll = 0x021E,
   1.364 +            AppCtrlFind = 0x021F,
   1.365 +            AppCtrlFindAndReplace = 0x0220,
   1.366 +            AppCtrlSearch = 0x0221,
   1.367 +            AppCtrlGoTo = 0x0222,
   1.368 +            AppCtrlHome = 0x0223,
   1.369 +            AppCtrlBack = 0x0224,
   1.370 +            AppCtrlForward = 0x0225,
   1.371 +            AppCtrlStop = 0x0226,
   1.372 +            AppCtrlRefresh = 0x0227,
   1.373 +            AppCtrlPreviousLink = 0x0228,
   1.374 +            AppCtrlNextLink = 0x0229,
   1.375 +            AppCtrlBookmarks = 0x022A,
   1.376 +            AppCtrlHistory = 0x022B,
   1.377 +            AppCtrlSubscriptions = 0x022C,
   1.378 +            AppCtrlZoomIn = 0x022D,
   1.379 +            AppCtrlZoomOut = 0x022E,
   1.380 +            AppCtrlZoom = 0x022F,
   1.381 +            AppCtrlFullScreenView = 0x0230,
   1.382 +            AppCtrlNormalView = 0x0231,
   1.383 +            AppCtrlViewToggle = 0x0232,
   1.384 +            AppCtrlScrollUp = 0x0233,
   1.385 +            AppCtrlScrollDown = 0x0234,
   1.386 +            AppCtrlScroll = 0x0235,
   1.387 +            AppCtrlPanLeft = 0x0236,
   1.388 +            AppCtrlPanRight = 0x0237,
   1.389 +            AppCtrlPan = 0x0238,
   1.390 +            AppCtrlNewWindow = 0x0239,
   1.391 +            AppCtrlTileHorizontally = 0x023A,
   1.392 +            AppCtrlTileVertically = 0x023B,
   1.393 +            AppCtrlFormat = 0x023C,
   1.394 +            AppCtrlEdit = 0x023D,
   1.395 +        }
   1.396 +    }
   1.397 +}
   1.398 \ No newline at end of file