Generated full list of consumer controls.
authorsl
Fri, 19 Dec 2014 18:05:53 +0100
changeset 33ddfd2ddf10e1
parent 32 634ac38db225
child 34 dab63af931a3
Generated full list of consumer controls.
Add Perl script we used for parsing.
HidUsageTableConsumer.txt
HidUsageTables.cs
genUsageTableEnum.pl
     1.1 --- a/HidUsageTableConsumer.txt	Fri Dec 19 16:54:32 2014 +0100
     1.2 +++ b/HidUsageTableConsumer.txt	Fri Dec 19 18:05:53 2014 +0100
     1.3 @@ -139,7 +139,8 @@
     1.4  10B Duress Alarm  OSC  15.11 
     1.5  10C Holdup Alarm  OSC  15.11 
     1.6  10D Medical Alarm  OSC  15.11 
     1.7 -10E-14F Reserved    150  Balance Right  RTC  15.9.2 
     1.8 +10E-14F Reserved    
     1.9 +150  Balance Right  RTC  15.9.2 
    1.10  151  Balance Left  RTC  15.9.2 
    1.11  152  Bass Increment  RTC  15.9.3 
    1.12  153  Bass Decrement  RTC  15.9.3 
     2.1 --- a/HidUsageTables.cs	Fri Dec 19 16:54:32 2014 +0100
     2.2 +++ b/HidUsageTables.cs	Fri Dec 19 18:05:53 2014 +0100
     2.3 @@ -49,7 +49,7 @@
     2.4      }
     2.5  
     2.6      public enum UsageCollectionGenericDesktop : ushort
     2.7 -    {      
     2.8 +    {
     2.9          Pointer = 0x01,
    2.10          Mouse = 0x02,
    2.11          Joystick = 0x04,
    2.12 @@ -90,10 +90,10 @@
    2.13          GenericGuiApplicationControls = 0x0200,
    2.14      }
    2.15  
    2.16 -    
    2.17 +
    2.18      public enum UsageCollectionWindowsMediaCenter: ushort
    2.19      {
    2.20 -        WindowsMediaCenterRemoteControl = 0x88        
    2.21 +        WindowsMediaCenterRemoteControl = 0x88
    2.22      }
    2.23  
    2.24  
    2.25 @@ -283,128 +283,334 @@
    2.26          /// Usage Table for Consumer Controls
    2.27          /// 0x0C 0X01
    2.28          /// </summary>
    2.29 -        public enum ConsumerControl: ushort
    2.30 +        public enum ConsumerControl : ushort
    2.31          {
    2.32 -            Null = 0x0000,           
    2.33 -            //           
    2.34 -            Channel = 0x0086,
    2.35 -            MediaSelectComputer = 0x0088,
    2.36 -            MediaSelectTV = 0x0089,
    2.37 -            MediaSelectWWW = 0x008A,
    2.38 -            MediaSelectDVD = 0x008B,
    2.39 -            MediaSelectTelephone = 0x008C,
    2.40 -            MediaSelectProgramGuide = 0x008D,
    2.41 -            MediaSelectVideoPhone = 0x008E,
    2.42 -            MediaSelectGames = 0x008F,
    2.43 -            MediaSelectMessages = 0x0090,
    2.44 -            MediaSelectCD = 0x0091,
    2.45 -            MediaSelectVCR = 0x0092,
    2.46 -            MediaSelectTuner = 0x0093,
    2.47 -            Quit = 0x0094,
    2.48 -            Help = 0x0095,
    2.49 -            MediaSelectTape = 0x0096,
    2.50 -            MediaSelectCable = 0x0097,
    2.51 -            MediaSelectSatellite = 0x0098,
    2.52 -            MediaSelectSecurity = 0x0099,
    2.53 -            MediaSelectHome = 0x009A,
    2.54 -            MediaSelectCall = 0x009B,
    2.55 -            ChannelIncrement = 0x009C,
    2.56 -            ChannelDecrement = 0x009D,
    2.57 -            MediaSelectSAP = 0x009E,
    2.58 +            Null = 0x0000,
    2.59              //
    2.60 -            Play = 0x00B0,
    2.61 -            Pause = 0x00B1,
    2.62 -            Record = 0x00B2,
    2.63 -            FastForward = 0x00B3,
    2.64 -            Rewind = 0x00B4,
    2.65 -            ScanNextTrack = 0x00B5,
    2.66 -            ScanPreviousTrack = 0x00B6,
    2.67 -            Stop = 0x00B7,
    2.68 -            Eject = 0x00B8,
    2.69 -            RandomPlay = 0x00B9,            
    2.70 -            EnterDisc = 0x00BB,
    2.71 -            Repeat = 0x00BC,
    2.72 -            Tracking = 0x00BD,
    2.73 -            TrackNormal = 0x00BE,
    2.74 -            SlowTracking = 0x00BF,
    2.75 -            FrameForward = 0x00C0,
    2.76 -            FrameBack = 0x00C1,
    2.77 -            Mark = 0x00C2,
    2.78 -            ClearMark = 0x00C3,
    2.79 -            RepeatFromMark = 0x00C4,
    2.80 -            ReturnToMark = 0x00C5,
    2.81 -            SearchMarkForward = 0x00C6,
    2.82 -            SearchMarkBackwards = 0x00C7,
    2.83 -            CounterReset = 0x00C8,
    2.84 -            ShowCounter = 0x00C9,
    2.85 -            TrackingIncrement = 0x00CA,
    2.86 -            TrackingDecrement = 0x00CB,
    2.87 -            StopEject = 0x00CC,
    2.88 -            PlayPause = 0x00CD,
    2.89 -            PlaySkip = 0x00CE,
    2.90 -
    2.91 -            /// <summary>
    2.92 -            /// Audio controls
    2.93 -            /// </summary>
    2.94 -            Volume = 0x00E0,
    2.95 -            Balance = 0x00E1,
    2.96 -            Mute = 0x00E2,
    2.97 -            Bass = 0x00E3,
    2.98 -            Treble = 0x00E4,
    2.99 -            BassBoost = 0x00E5,
   2.100 -            SurroundMode = 0x00E6,
   2.101 -            Loudness = 0x00E7,
   2.102 -            MPX = 0x00E8,
   2.103 -            VolumeIncrement = 0x00E9,
   2.104 -            VolumeDecrement = 0x00EA,
   2.105 -
   2.106 -            //Generic GUI Application Controls
   2.107 -            //GenericGUIApplicationControls = 0x0200,
   2.108 -            AppCtrlNew = 0x0201,
   2.109 -            AppCtrlOpen = 0x0202,
   2.110 -            AppCtrlClose = 0x0203,
   2.111 -            AppCtrlExit = 0x0204,
   2.112 -            AppCtrlMaximize = 0x0205,
   2.113 -            AppCtrlMinimize = 0x0206,
   2.114 -            AppCtrlSave = 0x0207,
   2.115 -            AppCtrlPrint = 0x0208,
   2.116 -            AppCtrlProperties = 0x0209,
   2.117 -            AppCtrlUndo = 0x021A,
   2.118 -            AppCtrlCopy = 0x021B,
   2.119 -            AppCtrlCut = 0x021C,
   2.120 -            AppCtrlPaste = 0x021D,
   2.121 -            AppCtrlSelectAll = 0x021E,
   2.122 -            AppCtrlFind = 0x021F,
   2.123 -            AppCtrlFindAndReplace = 0x0220,
   2.124 -            AppCtrlSearch = 0x0221,
   2.125 -            AppCtrlGoTo = 0x0222,
   2.126 -            AppCtrlHome = 0x0223,
   2.127 -            AppCtrlBack = 0x0224,
   2.128 -            AppCtrlForward = 0x0225,
   2.129 -            AppCtrlStop = 0x0226,
   2.130 -            AppCtrlRefresh = 0x0227,
   2.131 -            AppCtrlPreviousLink = 0x0228,
   2.132 -            AppCtrlNextLink = 0x0229,
   2.133 -            AppCtrlBookmarks = 0x022A,
   2.134 -            AppCtrlHistory = 0x022B,
   2.135 -            AppCtrlSubscriptions = 0x022C,
   2.136 -            AppCtrlZoomIn = 0x022D,
   2.137 -            AppCtrlZoomOut = 0x022E,
   2.138 -            AppCtrlZoom = 0x022F,
   2.139 -            AppCtrlFullScreenView = 0x0230,
   2.140 -            AppCtrlNormalView = 0x0231,
   2.141 -            AppCtrlViewToggle = 0x0232,
   2.142 -            AppCtrlScrollUp = 0x0233,
   2.143 -            AppCtrlScrollDown = 0x0234,
   2.144 -            AppCtrlScroll = 0x0235,
   2.145 -            AppCtrlPanLeft = 0x0236,
   2.146 -            AppCtrlPanRight = 0x0237,
   2.147 -            AppCtrlPan = 0x0238,
   2.148 -            AppCtrlNewWindow = 0x0239,
   2.149 -            AppCtrlTileHorizontally = 0x023A,
   2.150 -            AppCtrlTileVertically = 0x023B,
   2.151 -            AppCtrlFormat = 0x023C,
   2.152 -            AppCtrlEdit = 0x023D,
   2.153 +            ConsumerControl = 0x01,
   2.154 +            NumericKeyPad = 0x02,
   2.155 +            ProgrammableButtons = 0x03,
   2.156 +            Microphone = 0x04,
   2.157 +            Headphone = 0x05,
   2.158 +            GraphicEqualizer = 0x06,
   2.159 +            Plus10 = 0x20,
   2.160 +            Plus100 = 0x21,
   2.161 +            AmPm = 0x22,
   2.162 +            Power = 0x30,
   2.163 +            Reset = 0x31,
   2.164 +            Sleep = 0x32,
   2.165 +            SleepAfter = 0x33,
   2.166 +            SleepMode = 0x34,
   2.167 +            Illumination = 0x35,
   2.168 +            FunctionButtons = 0x36,
   2.169 +            Menu = 0x40,
   2.170 +            MenuPick = 0x41,
   2.171 +            MenuUp = 0x42,
   2.172 +            MenuDown = 0x43,
   2.173 +            MenuLeft = 0x44,
   2.174 +            MenuRight = 0x45,
   2.175 +            MenuEscape = 0x46,
   2.176 +            MenuValueIncrease = 0x47,
   2.177 +            MenuValueDecrease = 0x48,
   2.178 +            DataOnScreen = 0x60,
   2.179 +            ClosedCaption = 0x61,
   2.180 +            ClosedCaptionSelect = 0x62,
   2.181 +            VcrTv = 0x63,
   2.182 +            BroadcastMode = 0x64,
   2.183 +            Snapshot = 0x65,
   2.184 +            Still = 0x66,
   2.185 +            Selection = 0x80,
   2.186 +            AssignSelection = 0x81,
   2.187 +            ModeStep = 0x82,
   2.188 +            RecallLast = 0x83,
   2.189 +            EnterChannel = 0x84,
   2.190 +            OrderMovie = 0x85,
   2.191 +            Channel = 0x86,
   2.192 +            MediaSelection = 0x87,
   2.193 +            MediaSelectComputer = 0x88,
   2.194 +            MediaSelectTv = 0x89,
   2.195 +            MediaSelectWww = 0x8A,
   2.196 +            MediaSelectDvd = 0x8B,
   2.197 +            MediaSelectTelephone = 0x8C,
   2.198 +            MediaSelectProgramGuide = 0x8D,
   2.199 +            MediaSelectVideoPhone = 0x8E,
   2.200 +            MediaSelectGames = 0x8F,
   2.201 +            MediaSelectMessages = 0x90,
   2.202 +            MediaSelectCd = 0x91,
   2.203 +            MediaSelectVcr = 0x92,
   2.204 +            MediaSelectTuner = 0x93,
   2.205 +            Quit = 0x94,
   2.206 +            Help = 0x95,
   2.207 +            MediaSelectTape = 0x96,
   2.208 +            MediaSelectCable = 0x97,
   2.209 +            MediaSelectSatellite = 0x98,
   2.210 +            MediaSelectSecurity = 0x99,
   2.211 +            MediaSelectHome = 0x9A,
   2.212 +            MediaSelectCall = 0x9B,
   2.213 +            ChannelIncrement = 0x9C,
   2.214 +            ChannelDecrement = 0x9D,
   2.215 +            MediaSelectSap = 0x9E,
   2.216 +            VcrPlus = 0xA0,
   2.217 +            Once = 0xA1,
   2.218 +            Daily = 0xA2,
   2.219 +            Weekly = 0xA3,
   2.220 +            Monthly = 0xA4,
   2.221 +            Play = 0xB0,
   2.222 +            Pause = 0xB1,
   2.223 +            Record = 0xB2,
   2.224 +            FastForward = 0xB3,
   2.225 +            Rewind = 0xB4,
   2.226 +            ScanNextTrack = 0xB5,
   2.227 +            ScanPreviousTrack = 0xB6,
   2.228 +            Stop = 0xB7,
   2.229 +            Eject = 0xB8,
   2.230 +            RandomPlay = 0xB9,
   2.231 +            SelectDisc = 0xBA,
   2.232 +            EnterDisc = 0xBB,
   2.233 +            Repeat = 0xBC,
   2.234 +            Tracking = 0xBD,
   2.235 +            TrackNormal = 0xBE,
   2.236 +            SlowTracking = 0xBF,
   2.237 +            FrameForward = 0xC0,
   2.238 +            FrameBack = 0xC1,
   2.239 +            Mark = 0xC2,
   2.240 +            ClearMark = 0xC3,
   2.241 +            RepeatFromMark = 0xC4,
   2.242 +            ReturnToMark = 0xC5,
   2.243 +            SearchMarkForward = 0xC6,
   2.244 +            SearchMarkBackwards = 0xC7,
   2.245 +            CounterReset = 0xC8,
   2.246 +            ShowCounter = 0xC9,
   2.247 +            TrackingIncrement = 0xCA,
   2.248 +            TrackingDecrement = 0xCB,
   2.249 +            StopEject = 0xCC,
   2.250 +            PlayPause = 0xCD,
   2.251 +            PlaySkip = 0xCE,
   2.252 +            Volume = 0xE0,
   2.253 +            Balance = 0xE1,
   2.254 +            Mute = 0xE2,
   2.255 +            Bass = 0xE3,
   2.256 +            Treble = 0xE4,
   2.257 +            BassBoost = 0xE5,
   2.258 +            SurroundMode = 0xE6,
   2.259 +            Loudness = 0xE7,
   2.260 +            Mpx = 0xE8,
   2.261 +            VolumeIncrement = 0xE9,
   2.262 +            VolumeDecrement = 0xEA,
   2.263 +            SpeedSelect = 0xF0,
   2.264 +            PlaybackSpeed = 0xF1,
   2.265 +            StandardPlay = 0xF2,
   2.266 +            LongPlay = 0xF3,
   2.267 +            ExtendedPlay = 0xF4,
   2.268 +            Slow = 0xF5,
   2.269 +            FanEnable = 0x100,
   2.270 +            FanSpeed = 0x101,
   2.271 +            LightEnable = 0x102,
   2.272 +            LightIlluminationLevel = 0x103,
   2.273 +            ClimateControlEnable = 0x104,
   2.274 +            RoomTemperature = 0x105,
   2.275 +            SecurityEnable = 0x106,
   2.276 +            FireAlarm = 0x107,
   2.277 +            PoliceAlarm = 0x108,
   2.278 +            Proximity = 0x109,
   2.279 +            Motion = 0x10A,
   2.280 +            DuressAlarm = 0x10B,
   2.281 +            HoldupAlarm = 0x10C,
   2.282 +            MedicalAlarm = 0x10D,
   2.283 +            BalanceRight = 0x150,
   2.284 +            BalanceLeft = 0x151,
   2.285 +            BassIncrement = 0x152,
   2.286 +            BassDecrement = 0x153,
   2.287 +            TrebleIncrement = 0x154,
   2.288 +            TrebleDecrement = 0x155,
   2.289 +            SpeakerSystem = 0x160,
   2.290 +            ChannelLeft = 0x161,
   2.291 +            ChannelRight = 0x162,
   2.292 +            ChannelCenter = 0x163,
   2.293 +            ChannelFront = 0x164,
   2.294 +            ChannelCenterFront = 0x165,
   2.295 +            ChannelSide = 0x166,
   2.296 +            ChannelSurround = 0x167,
   2.297 +            ChannelLowFrequencyEnhancement = 0x168,
   2.298 +            ChannelTop = 0x169,
   2.299 +            ChannelUnknown = 0x16A,
   2.300 +            SubChannel = 0x170,
   2.301 +            SubChannelIncrement = 0x171,
   2.302 +            SubChannelDecrement = 0x172,
   2.303 +            AlternateAudioIncrement = 0x173,
   2.304 +            AlternateAudioDecrement = 0x174,
   2.305 +            ApplicationLaunchButtons = 0x180,
   2.306 +            AppLaunchLaunchButtonConfigurationTool = 0x181,
   2.307 +            AppLaunchProgrammableButtonConfiguration = 0x182,
   2.308 +            AppLaunchConsumerControlConfiguration = 0x183,
   2.309 +            AppLaunchWordProcessor = 0x184,
   2.310 +            AppLaunchTextEditor = 0x185,
   2.311 +            AppLaunchSpreadsheet = 0x186,
   2.312 +            AppLaunchGraphicsEditor = 0x187,
   2.313 +            AppLaunchPresentationApp = 0x188,
   2.314 +            AppLaunchDatabaseApp = 0x189,
   2.315 +            AppLaunchEmailReader = 0x18A,
   2.316 +            AppLaunchNewsreader = 0x18B,
   2.317 +            AppLaunchVoicemail = 0x18C,
   2.318 +            AppLaunchContactsAddressBook = 0x18D,
   2.319 +            AppLaunchCalendarSchedule = 0x18E,
   2.320 +            AppLaunchTaskProjectManager = 0x18F,
   2.321 +            AppLaunchLogJournalTimecard = 0x190,
   2.322 +            AppLaunchCheckbookFinance = 0x191,
   2.323 +            AppLaunchCalculator = 0x192,
   2.324 +            AppLaunchAVCapturePlayback = 0x193,
   2.325 +            AppLaunchLocalMachineBrowser = 0x194,
   2.326 +            AppLaunchLanWanBrowser = 0x195,
   2.327 +            AppLaunchInternetBrowser = 0x196,
   2.328 +            AppLaunchRemoteNetworkingIspConnect = 0x197,
   2.329 +            AppLaunchNetworkConference = 0x198,
   2.330 +            AppLaunchNetworkChat = 0x199,
   2.331 +            AppLaunchTelephonyDialer = 0x19A,
   2.332 +            AppLaunchLogon = 0x19B,
   2.333 +            AppLaunchLogoff = 0x19C,
   2.334 +            AppLaunchLogonLogoff = 0x19D,
   2.335 +            AppLaunchTerminalLockScreensaver = 0x19E,
   2.336 +            AppLaunchControlPanel = 0x19F,
   2.337 +            AppLaunchCommandLineProcessorRun = 0x1A0,
   2.338 +            AppLaunchProcessTaskManager = 0x1A1,
   2.339 +            AppLaunchSelectTaskApplication = 0x1A2,
   2.340 +            AppLaunchNextTaskApplication = 0x1A3,
   2.341 +            AppLaunchPreviousTaskApplication = 0x1A4,
   2.342 +            AppLaunchPreemptiveHaltTaskApplication = 0x1A5,
   2.343 +            AppLaunchIntegratedHelpCenter = 0x1A6,
   2.344 +            AppLaunchDocuments = 0x1A7,
   2.345 +            AppLaunchThesaurus = 0x1A8,
   2.346 +            AppLaunchDictionary = 0x1A9,
   2.347 +            AppLaunchDesktop = 0x1AA,
   2.348 +            AppLaunchSpellCheck = 0x1AB,
   2.349 +            AppLaunchGrammarCheck = 0x1AC,
   2.350 +            AppLaunchWirelessStatus = 0x1AD,
   2.351 +            AppLaunchKeyboardLayout = 0x1AE,
   2.352 +            AppLaunchVirusProtection = 0x1AF,
   2.353 +            AppLaunchEncryption = 0x1B0,
   2.354 +            AppLaunchScreenSaver = 0x1B1,
   2.355 +            AppLaunchAlarms = 0x1B2,
   2.356 +            AppLaunchClock = 0x1B3,
   2.357 +            AppLaunchFileBrowser = 0x1B4,
   2.358 +            AppLaunchPowerStatus = 0x1B5,
   2.359 +            AppLaunchImageBrowser = 0x1B6,
   2.360 +            AppLaunchAudioBrowser = 0x1B7,
   2.361 +            AppLaunchMovieBrowser = 0x1B8,
   2.362 +            AppLaunchDigitalRightsManager = 0x1B9,
   2.363 +            AppLaunchDigitalWallet = 0x1BA,
   2.364 +            AppLaunchInstantMessaging = 0x1BC,
   2.365 +            AppLaunchOemFeaturesTipsTutorialBrowser = 0x1BD,
   2.366 +            AppLaunchOemHelp = 0x1BE,
   2.367 +            AppLaunchOnlineCommunity = 0x1BF,
   2.368 +            AppLaunchEntertainmentContentBrowser = 0x1C0,
   2.369 +            AppLaunchOnlineShoppingBrowser = 0x1C1,
   2.370 +            AppLaunchSmartcardInformationHelp = 0x1C2,
   2.371 +            AppLaunchMarketMonitorFinanceBrowser = 0x1C3,
   2.372 +            AppLaunchCustomizedCorporateNewsBrowser = 0x1C4,
   2.373 +            AppLaunchOnlineActivityBrowser = 0x1C5,
   2.374 +            AppLaunchResearchSearchBrowser = 0x1C6,
   2.375 +            AppLaunchAudioPlayer = 0x1C7,
   2.376 +            GenericGuiApplicationControls = 0x200,
   2.377 +            AppCtrlNew = 0x201,
   2.378 +            AppCtrlOpen = 0x202,
   2.379 +            AppCtrlClose = 0x203,
   2.380 +            AppCtrlExit = 0x204,
   2.381 +            AppCtrlMaximize = 0x205,
   2.382 +            AppCtrlMinimize = 0x206,
   2.383 +            AppCtrlSave = 0x207,
   2.384 +            AppCtrlPrint = 0x208,
   2.385 +            AppCtrlProperties = 0x209,
   2.386 +            AppCtrlUndo = 0x21A,
   2.387 +            AppCtrlCopy = 0x21B,
   2.388 +            AppCtrlCut = 0x21C,
   2.389 +            AppCtrlPaste = 0x21D,
   2.390 +            AppCtrlSelectAll = 0x21E,
   2.391 +            AppCtrlFind = 0x21F,
   2.392 +            AppCtrlFindAndReplace = 0x220,
   2.393 +            AppCtrlSearch = 0x221,
   2.394 +            AppCtrlGoTo = 0x222,
   2.395 +            AppCtrlHome = 0x223,
   2.396 +            AppCtrlBack = 0x224,
   2.397 +            AppCtrlForward = 0x225,
   2.398 +            AppCtrlStop = 0x226,
   2.399 +            AppCtrlRefresh = 0x227,
   2.400 +            AppCtrlPreviousLink = 0x228,
   2.401 +            AppCtrlNextLink = 0x229,
   2.402 +            AppCtrlBookmarks = 0x22A,
   2.403 +            AppCtrlHistory = 0x22B,
   2.404 +            AppCtrlSubscriptions = 0x22C,
   2.405 +            AppCtrlZoomIn = 0x22D,
   2.406 +            AppCtrlZoomOut = 0x22E,
   2.407 +            AppCtrlZoom = 0x22F,
   2.408 +            AppCtrlFullScreenView = 0x230,
   2.409 +            AppCtrlNormalView = 0x231,
   2.410 +            AppCtrlViewToggle = 0x232,
   2.411 +            AppCtrlScrollUp = 0x233,
   2.412 +            AppCtrlScrollDown = 0x234,
   2.413 +            AppCtrlScroll = 0x235,
   2.414 +            AppCtrlPanLeft = 0x236,
   2.415 +            AppCtrlPanRight = 0x237,
   2.416 +            AppCtrlPan = 0x238,
   2.417 +            AppCtrlNewWindow = 0x239,
   2.418 +            AppCtrlTileHorizontally = 0x23A,
   2.419 +            AppCtrlTileVertically = 0x23B,
   2.420 +            AppCtrlFormat = 0x23C,
   2.421 +            AppCtrlEdit = 0x23D,
   2.422 +            AppCtrlBold = 0x23E,
   2.423 +            AppCtrlItalics = 0x23F,
   2.424 +            AppCtrlUnderline = 0x240,
   2.425 +            AppCtrlStrikethrough = 0x241,
   2.426 +            AppCtrlSubscript = 0x242,
   2.427 +            AppCtrlSuperscript = 0x243,
   2.428 +            AppCtrlAllCaps = 0x244,
   2.429 +            AppCtrlRotate = 0x245,
   2.430 +            AppCtrlResize = 0x246,
   2.431 +            AppCtrlFlipHorizontal = 0x247,
   2.432 +            AppCtrlFlipVertical = 0x248,
   2.433 +            AppCtrlMirrorHorizontal = 0x249,
   2.434 +            AppCtrlMirrorVertical = 0x24A,
   2.435 +            AppCtrlFontSelect = 0x24B,
   2.436 +            AppCtrlFontColor = 0x24C,
   2.437 +            AppCtrlFontSize = 0x24D,
   2.438 +            AppCtrlJustifyLeft = 0x24E,
   2.439 +            AppCtrlJustifyCenterH = 0x24F,
   2.440 +            AppCtrlJustifyRight = 0x250,
   2.441 +            AppCtrlJustifyBlockH = 0x251,
   2.442 +            AppCtrlJustifyTop = 0x252,
   2.443 +            AppCtrlJustifyCenterV = 0x253,
   2.444 +            AppCtrlJustifyBottom = 0x254,
   2.445 +            AppCtrlJustifyBlockV = 0x255,
   2.446 +            AppCtrlIndentDecrease = 0x256,
   2.447 +            AppCtrlIndentIncrease = 0x257,
   2.448 +            AppCtrlNumberedList = 0x258,
   2.449 +            AppCtrlRestartNumbering = 0x259,
   2.450 +            AppCtrlBulletedList = 0x25A,
   2.451 +            AppCtrlPromote = 0x25B,
   2.452 +            AppCtrlDemote = 0x25C,
   2.453 +            AppCtrlYes = 0x25D,
   2.454 +            AppCtrlNo = 0x25E,
   2.455 +            AppCtrlCancel = 0x25F,
   2.456 +            AppCtrlCatalog = 0x260,
   2.457 +            AppCtrlBuyCheckout = 0x261,
   2.458 +            AppCtrlAddToCart = 0x262,
   2.459 +            AppCtrlExpand = 0x263,
   2.460 +            AppCtrlExpandAll = 0x264,
   2.461 +            AppCtrlCollapse = 0x265,
   2.462 +            AppCtrlCollapseAll = 0x266,
   2.463 +            AppCtrlPrintPreview = 0x267,
   2.464 +            AppCtrlPasteSpecial = 0x268,
   2.465 +            AppCtrlInsertMode = 0x269,
   2.466 +            AppCtrlDelete = 0x26A,
   2.467 +            AppCtrlLock = 0x26B,
   2.468 +            AppCtrlUnlock = 0x26C,
   2.469 +            AppCtrlProtect = 0x26D,
   2.470 +            AppCtrlUnprotect = 0x26E,
   2.471 +            AppCtrlAttachComment = 0x26F,
   2.472 +            AppCtrlDeleteComment = 0x270,
   2.473 +            AppCtrlViewComment = 0x271,
   2.474 +            AppCtrlSelectWord = 0x272,
   2.475 +            AppCtrlSelectSentence = 0x273,
   2.476 +            AppCtrlDistributeVertically = 0x29C
   2.477          }
   2.478      }
   2.479  }
   2.480 \ No newline at end of file
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/genUsageTableEnum.pl	Fri Dec 19 18:05:53 2014 +0100
     3.3 @@ -0,0 +1,106 @@
     3.4 +#!/usr/local/bin/perl
     3.5 +#Developed by Stéphane Lenclud
     3.6 +#Generate C# enumeration from parsing Hid Usage Table
     3.7 +#See ../data/gl.h
     3.8 +#Usage example
     3.9 +#perl -S genUsageTableEnum.pl ../data/gl.h
    3.10 +
    3.11 +use strict;
    3.12 +use warnings;	
    3.13 +
    3.14 +
    3.15 +my $inputFile = $ARGV[0];
    3.16 +
    3.17 +#my $dummy="lala";
    3.18 +#$dummy=~s/(^\w)/uc($1)/e;
    3.19 +#print "$dummy";
    3.20 +#exit(0);
    3.21 +
    3.22 +#Open input file
    3.23 +open INPUT, "< $inputFile" or die "Can't read $inputFile\n";
    3.24 +my @lines = <INPUT>;
    3.25 +close INPUT;
    3.26 +
    3.27 +
    3.28 +my %hash = ();
    3.29 +
    3.30 +my $count=0;
    3.31 +foreach my $line(@lines)
    3.32 +	{
    3.33 +	#if ($line=~ /^\#\s*define\s+(.+?)\s+([a-fA-FxX\d]+?)\s*$/)	
    3.34 +	if ($line=~ /^([a-fA-FxX\d]+)(.+)\s+\w+\s+15\..*$/)	
    3.35 +		{
    3.36 +		my $string=$2;
    3.37 +		my $value=$1;
    3.38 +		
    3.39 +		my $varName=FormatVarName($string);	
    3.40 +
    3.41 +		
    3.42 +		$hash{$string}=$value;
    3.43 +		
    3.44 +		print "$varName = 0x$value,\n";			
    3.45 +		}
    3.46 +	else
    3.47 +		{
    3.48 +		#print "NO MATCH $line\n";
    3.49 +		}
    3.50 +	}
    3.51 +
    3.52 +exit(0);	
    3.53 +	
    3.54 +#Output in sorted order	
    3.55 +for my $string ( sort keys %hash )
    3.56 +	{	
    3.57 +    #print "_S8(\"$string\"),$hash{$string}, //$count\n";
    3.58 +    print "_S8(\"$string\"),$string, //$count\n";						
    3.59 +    $count++;	
    3.60 +    }	
    3.61 +	
    3.62 +	
    3.63 +print "$count const found.\n";	
    3.64 +	
    3.65 +exit(0);
    3.66 +
    3.67 +#	
    3.68 +
    3.69 +sub FormatVarName
    3.70 +	{
    3.71 +	my $text=$_[0];	
    3.72 +	my $varName="";
    3.73 +	Trim($text);
    3.74 +	#Make sure AC ends up as AppCtrl
    3.75 +	$text=~s/(^AC)/App Ctrl/;
    3.76 +	#Make sure AL ends up as AppLaunch
    3.77 +	$text=~s/(^AL)/App Launch/;		
    3.78 +	#Replace / by white-space
    3.79 +	$text=~s/\// /g;
    3.80 +	#Replace + with Plus
    3.81 +	$text=~s/\+/Plus/g;
    3.82 +	#Replace - with white-space
    3.83 +	$text=~s/-/ /g;
    3.84 +
    3.85 +	
    3.86 +	$text=lc($text);
    3.87 +	while ($text=~/(\w+)\s+(.+)/)
    3.88 +		{		
    3.89 +		my $word=$1;
    3.90 +		$text=$2;
    3.91 +		#upper case the first letter
    3.92 +		$word=~s/(^\w)/uc($1)/e;	
    3.93 +		$varName.=$word;		
    3.94 +		}
    3.95 +	
    3.96 +	$text=~s/(^\w)/uc($1)/e;					
    3.97 +	$varName.=$text;		
    3.98 +	#get ride of -			
    3.99 +	$varName=~s/-(\w)/uc($1)/e;
   3.100 +
   3.101 +	return $varName;
   3.102 +	}
   3.103 +	
   3.104 +sub Trim
   3.105 +	{
   3.106 +	$_[0] =~ s/^\s+//; #Trim leading space and line return char
   3.107 +	$_[0] =~ s/\s+$//; #Trim trailling space and line return char
   3.108 +	}	
   3.109 +