From d91c0fb23ffed0382bcd7e42874127f396627aee Mon Sep 17 00:00:00 2001 From: Jacob Alexander Date: Sun, 10 May 2015 14:52:07 -0700 Subject: [PATCH] Adding media key support to KLL compiler (0.3b) - Full HID dictionaries for LED, Consumer Control and System Control - Re-organized parameter passing (will help with future kll spec additions) --- backends/kiibohd.py | 31 +- examples/simple2.kll | 13 +- kll.py | 155 +++- kll_lib/hid_dict.py | 1925 ++++++++++++++++++++++++++++++++---------- 4 files changed, 1617 insertions(+), 507 deletions(-) diff --git a/backends/kiibohd.py b/backends/kiibohd.py index ca1f4fb..44daad8 100644 --- a/backends/kiibohd.py +++ b/backends/kiibohd.py @@ -29,8 +29,9 @@ from datetime import date # Modifying Python Path, which is dumb, but the only way to import up one directory... sys.path.append( os.path.expanduser('..') ) -from kll_lib.containers import * from kll_lib.backends import * +from kll_lib.containers import * +from kll_lib.hid_dict import * ### Classes ### @@ -40,9 +41,16 @@ class Backend( BackendBase ): templatePaths = ["templates/kiibohdKeymap.h", "templates/kiibohdDefs.h"] outputPaths = ["generatedKeymap.h", "kll_defs.h"] - # USB Code Capability Name - def usbCodeCapability( self ): - return "usbKeyOut"; + requiredCapabilities = { + 'CONS' : 'consCtrlOut', + 'NONE' : 'noneOut', + 'SYS' : 'sysCtrlOut', + 'USB' : 'usbKeyOut', + } + + # Capability Lookup + def capabilityLookup( self, type ): + return self.requiredCapabilities[ type ]; # TODO @@ -146,7 +154,7 @@ class Backend( BackendBase ): # Needed for USB behaviour, otherwise, repeated keys will not work if sequence > 0: # , , - self.fill_dict['ResultMacros'] += "1, {0}, 0x00, ".format( capabilities.getIndex( self.usbCodeCapability() ) ) + self.fill_dict['ResultMacros'] += "1, {0}, 0x00, ".format( capabilities.getIndex( self.capabilityLookup('USB') ) ) # For each combo in the sequence, add the length of the combo self.fill_dict['ResultMacros'] += "{0}, ".format( len( macros.resultsIndexSorted[ result ][ sequence ] ) ) @@ -160,13 +168,22 @@ class Backend( BackendBase ): # Add each of the arguments of the capability for arg in range( 0, len( resultItem[1] ) ): - self.fill_dict['ResultMacros'] += "{0}, ".format( resultItem[1][ arg ] ) + # If this is a CONSUMER_ element, needs to be split into 2 elements + if isinstance( resultItem[1][ arg ], str ) and re.match( '^CONSUMER_', resultItem[1][ arg ] ): + tag = resultItem[1][ arg ].split( '_', 1 )[1] + if '_' in tag: + tag = tag.replace( '_', '' ) + lookupNum = kll_hid_lookup_dictionary['ConsCode'][ tag ][1] + byteForm = lookupNum.to_bytes( 2, byteorder='little' ) # XXX Yes, little endian from how the uC structs work + self.fill_dict['ResultMacros'] += "{0}, {1}, ".format( *byteForm ) + else: + self.fill_dict['ResultMacros'] += "{0}, ".format( resultItem[1][ arg ] ) # If sequence is longer than 1, append a sequence spacer at the end of the sequence # Required by USB to end at sequence without holding the key down if len( macros.resultsIndexSorted[ result ] ) > 1: # , , - self.fill_dict['ResultMacros'] += "1, {0}, 0x00, ".format( capabilities.getIndex( self.usbCodeCapability() ) ) + self.fill_dict['ResultMacros'] += "1, {0}, 0x00, ".format( capabilities.getIndex( self.capabilityLookup('USB') ) ) # Add list ending 0 and end of list self.fill_dict['ResultMacros'] += "0 };\n" diff --git a/examples/simple2.kll b/examples/simple2.kll index 52e808e..9183d3f 100644 --- a/examples/simple2.kll +++ b/examples/simple2.kll @@ -10,6 +10,9 @@ mydefine2 => myCdef2; mydefine3 => myCdef3; mynumber => myCnumber; usbKeyOut => Output_usbCodeSend_capability( usbCode : 1 ); +consCtrlOut => Output_consCtrlSend_capability( consCode : 2 ); +noneOut => Output_noneSend_capability(); +sysCtrlOut => Output_sysCtrlSend_capability( sysCode : 1 ); myCapability2 => myFunc2(); myCapability3 => myFunc3( myArg1 : 2 ); myCapability => myFunc( myArg1 : 1, myArg2 : 4 ); @@ -17,7 +20,7 @@ myCapability => myFunc( myArg1 : 1, myArg2 : 4 ); S0x3 : myCapability2(); S0x4 : myCapability( 0x8, 0x25 ); S0x12 : U[122] + U[123]; -S0x6 : 'abcdDfF'; +S0x6 : 'abcdDfF'; # TODO S0x40 : U[0x1]; S0x40 : U[0x1-0x4]; S0x0B : U["Esc"]; @@ -28,3 +31,11 @@ S[ 0x2 - 0x9, 0x10 ] :+ U"r"; S0x0B :- U["Esc"]; S127 + S128 : U"0"; +S0x41 : CONS[0x30]; +S0x42 : CONS["Play"]; +S0x43 : CONS0x31; + +S0x45 : SYS[0xA0]; +S0x46 : SYS["UnDock"]; +S0x47 : SYS0xA2; + diff --git a/kll.py b/kll.py index 2ddd35a..95884da 100755 --- a/kll.py +++ b/kll.py @@ -20,19 +20,19 @@ ### Imports ### import argparse +import importlib import io import os import re import sys import token -import importlib -from tokenize import generate_tokens -from re import VERBOSE from pprint import pformat +from re import VERBOSE +from tokenize import generate_tokens -from kll_lib.hid_dict import * from kll_lib.containers import * +from kll_lib.hid_dict import * from funcparserlib.lexer import make_tokenizer, Token, LexerError from funcparserlib.parser import (some, a, many, oneplus, skip, finished, maybe, skip, forward_decl, NoParseError) @@ -138,6 +138,12 @@ def tokenize( string ): ( 'Space', ( r'[ \t\r\n]+', ) ), ( 'USBCode', ( r'U(("[^"]+")|(0x[0-9a-fA-F]+)|([0-9]+))', ) ), ( 'USBCodeStart', ( r'U\[', ) ), + ( 'ConsCode', ( r'CONS(("[^"]+")|(0x[0-9a-fA-F]+)|([0-9]+))', ) ), + ( 'ConsCodeStart', ( r'CONS\[', ) ), + ( 'SysCode', ( r'SYS(("[^"]+")|(0x[0-9a-fA-F]+)|([0-9]+))', ) ), + ( 'SysCodeStart', ( r'SYS\[', ) ), + ( 'LedCode', ( r'LED(("[^"]+")|(0x[0-9a-fA-F]+)|([0-9]+))', ) ), + ( 'LedCodeStart', ( r'LED\[', ) ), ( 'ScanCode', ( r'S((0x[0-9a-fA-F]+)|([0-9]+))', ) ), ( 'ScanCodeStart', ( r'S\[', ) ), ( 'CodeEnd', ( r'\]', ) ), @@ -148,6 +154,7 @@ def tokenize( string ): ( 'Dash', ( r'-', ) ), ( 'Plus', ( r'\+', ) ), ( 'Parenthesis', ( r'\(|\)', ) ), + ( 'None', ( r'None', ) ), ( 'Number', ( r'-?(0x[0-9a-fA-F]+)|(0|([1-9][0-9]*))', VERBOSE ) ), ( 'Name', ( r'[A-Za-z_][A-Za-z_0-9]*', ) ), ( 'VariableContents', ( r'''[^"' ;:=>()]+''', ) ), @@ -180,26 +187,73 @@ def make_scanCode( token ): raise return scanCode -def make_usbCode( token ): +def make_hidCode( type, token ): # If first character is a U, strip if token[0] == "U": token = token[1:] + # CONS specifier + elif 'CONS' in token: + token = token[4:] + # SYS specifier + elif 'SYS' in token: + token = token[3:] # If using string representation of USB Code, do lookup, case-insensitive if '"' in token: try: - usbCode = kll_hid_lookup_dictionary[ token[1:-1].upper() ] + hidCode = kll_hid_lookup_dictionary[ type ][ token[1:-1].upper() ][1] except LookupError as err: - print ( "{0} {1} is an invalid USB Code Lookup...".format( ERROR, err ) ) + print ( "{0} {1} is an invalid USB HID Code Lookup...".format( ERROR, err ) ) raise else: - usbCode = int( token, 0 ) + # Already tokenized + if type == 'USBCode' and token[0] == 'USB' or type == 'SysCode' and token[0] == 'SYS' or type == 'ConsCode' and token[0] == 'CONS': + hidCode = token[1] + # Convert + else: + hidCode = int( token, 0 ) - # Check size, to make sure it's valid - if usbCode > 0xFF: - print ( "{0} USBCode value {1} is larger than 255".format( ERROR, usbCode ) ) + # Check size if a USB Code, to make sure it's valid + if type == 'USBCode' and hidCode > 0xFF: + print ( "{0} USBCode value {1} is larger than 255".format( ERROR, hidCode ) ) raise - return usbCode + + # Return a tuple, identifying which type it is + if type == 'USBCode': + return make_usbCode_number( hidCode ) + elif type == 'ConsCode': + return make_consCode_number( hidCode ) + elif type == 'SysCode': + return make_sysCode_number( hidCode ) + + print ( "{0} Unknown HID Specifier '{1}'".format( ERROR, type ) ) + raise + +def make_usbCode( token ): + return make_hidCode( 'USBCode', token ) + +def make_consCode( token ): + return make_hidCode( 'ConsCode', token ) + +def make_sysCode( token ): + return make_hidCode( 'SysCode', token ) + +def make_hidCode_number( type, token ): + lookup = { + 'ConsCode' : 'CONS', + 'SysCode' : 'SYS', + 'USBCode' : 'USB', + } + return ( lookup[ type ], token ) + +def make_usbCode_number( token ): + return make_hidCode_number( 'USBCode', token ) + +def make_consCode_number( token ): + return make_hidCode_number( 'ConsCode', token ) + +def make_sysCode_number( token ): + return make_hidCode_number( 'SysCode', token ) def make_seqString( token ): # Shifted Characters, and amount to move by to get non-shifted version @@ -222,7 +276,7 @@ def make_seqString( token ): ) listOfLists = [] - shiftKey = kll_hid_lookup_dictionary["SHIFT"] + shiftKey = kll_hid_lookup_dictionary['USBCode']["SHIFT"] # Creates a list of USB codes from the string: sequence (list) of combos (lists) for char in token[1:-1]: @@ -240,7 +294,7 @@ def make_seqString( token ): # Do KLL HID Lookup on non-shifted character # NOTE: Case-insensitive, which is why the shift must be pre-computed - usbCode = kll_hid_lookup_dictionary[ processedChar.upper() ] + usbCode = kll_hid_lookup_dictionary['USBCode'][ processedChar.upper() ] # Create Combo for this character, add shift key if shifted charCombo = [] @@ -275,27 +329,40 @@ def make_scanCode_range( rangeVals ): return list( range( start, end + 1 ) ) # Range can go from high to low or low to high - # Warn on 0-9 (as this does not do what one would expect) TODO + # Warn on 0-9 for USBCodes (as this does not do what one would expect) TODO # Lookup USB HID tags and convert to a number -def make_usbCode_range( rangeVals ): +def make_hidCode_range( type, rangeVals ): # Check if already integers if isinstance( rangeVals[0], int ): start = rangeVals[0] else: - start = make_usbCode( rangeVals[0] ) + start = make_hidCode( type, rangeVals[0] )[1] if isinstance( rangeVals[1], int ): end = rangeVals[1] else: - end = make_usbCode( rangeVals[1] ) + end = make_hidCode( type, rangeVals[1] )[1] # Swap start, end if start is greater than end if start > end: start, end = end, start # Iterate from start to end, and generate the range - return list( range( start, end + 1 ) ) - pass + listRange = list( range( start, end + 1 ) ) + + # Convert each item in the list to a tuple + for item in range( len( listRange ) ): + listRange[ item ] = make_hidCode_number( type, listRange[ item ] ) + return listRange + +def make_usbCode_range( rangeVals ): + return make_hidCode_range( 'USBCode', rangeVals ) + +def make_sysCode_range( rangeVals ): + return make_hidCode_range( 'SysCode', rangeVals ) + +def make_consCode_range( rangeVals ): + return make_hidCode_range( 'ConsCode', rangeVals ) ## Base Rules @@ -387,17 +454,19 @@ def optionExpansion( sequences ): # Converts USB Codes into Capabilities -def usbCodeToCapability( items ): +# These are tuples (, ) +def hidCodeToCapability( items ): # Items already converted to variants using optionExpansion for variant in range( 0, len( items ) ): # Sequence of Combos for sequence in range( 0, len( items[ variant ] ) ): for combo in range( 0, len( items[ variant ][ sequence ] ) ): - # Only convert if an integer, otherwise USB Code doesn't need converting - if isinstance( items[ variant ][ sequence ][ combo ], int ): + if items[ variant ][ sequence ][ combo ][0] in backend.requiredCapabilities.keys(): # Use backend capability name and a single argument - items[ variant ][ sequence ][ combo ] = tuple( [ backend.usbCodeCapability(), tuple( [ hid_lookup_dictionary[ items[ variant ][ sequence ][ combo ] ] ] ) ] ) - + items[ variant ][ sequence ][ combo ] = tuple( + [ backend.capabilityLookup( items[ variant ][ sequence ][ combo ][0] ), + tuple( [ hid_lookup_dictionary[ items[ variant ][ sequence ][ combo ] ] ] ) ] + ) return items @@ -464,6 +533,8 @@ set_define = unarg( eval_define ) usbCode = tokenType('USBCode') >> make_usbCode scanCode = tokenType('ScanCode') >> make_scanCode +consCode = tokenType('ConsCode') >> make_consCode +sysCode = tokenType('SysCode') >> make_sysCode name = tokenType('Name') number = tokenType('Number') >> make_number comma = tokenType('Comma') @@ -490,25 +561,49 @@ scanCode_sequence = oneplus( scanCode_combo + skip( maybe( comma ) ) ) # USB Codes usbCode_start = tokenType('USBCodeStart') -usbCode_range = ( number | unString ) + skip( dash ) + ( number | unString ) >> make_usbCode_range +usbCode_number = number >> make_usbCode_number +usbCode_range = ( usbCode_number | unString ) + skip( dash ) + ( number | unString ) >> make_usbCode_range usbCode_listElemTag = unString >> make_usbCode -usbCode_listElem = ( number | usbCode_listElemTag ) >> listElem +usbCode_listElem = ( usbCode_number | usbCode_listElemTag ) >> listElem usbCode_innerList = oneplus( ( usbCode_range | usbCode_listElem ) + skip( maybe( comma ) ) ) >> flatten usbCode_expanded = skip( usbCode_start ) + usbCode_innerList + skip( code_end ) usbCode_elem = usbCode >> listElem usbCode_combo = oneplus( ( usbCode_expanded | usbCode_elem ) + skip( maybe( plus ) ) ) >> listElem usbCode_sequence = oneplus( ( usbCode_combo | seqString ) + skip( maybe( comma ) ) ) >> oneLayerFlatten + # Cons Codes +consCode_start = tokenType('ConsCodeStart') +consCode_number = number >> make_consCode_number +consCode_range = ( consCode_number | unString ) + skip( dash ) + ( number | unString ) >> make_consCode_range +consCode_listElemTag = unString >> make_consCode +consCode_listElem = ( consCode_number | consCode_listElemTag ) >> listElem +consCode_innerList = oneplus( ( consCode_range | consCode_listElem ) + skip( maybe( comma ) ) ) >> flatten +consCode_expanded = skip( consCode_start ) + consCode_innerList + skip( code_end ) +consCode_elem = consCode >> listElem + + # Sys Codes +sysCode_start = tokenType('SysCodeStart') +sysCode_number = number >> make_sysCode_number +sysCode_range = ( sysCode_number | unString ) + skip( dash ) + ( number | unString ) >> make_sysCode_range +sysCode_listElemTag = unString >> make_sysCode +sysCode_listElem = ( sysCode_number | sysCode_listElemTag ) >> listElem +sysCode_innerList = oneplus( ( sysCode_range | sysCode_listElem ) + skip( maybe( comma ) ) ) >> flatten +sysCode_expanded = skip( sysCode_start ) + sysCode_innerList + skip( code_end ) +sysCode_elem = sysCode >> listElem + + # HID Codes +hidCode_elem = usbCode_expanded | usbCode_elem | sysCode_expanded | sysCode_elem | consCode_expanded | consCode_elem + # Capabilities capFunc_arguments = many( number + skip( maybe( comma ) ) ) >> listToTuple capFunc_elem = name + skip( parenthesis('(') ) + capFunc_arguments + skip( parenthesis(')') ) >> capArgExpander >> listElem -capFunc_combo = oneplus( ( usbCode_expanded | usbCode_elem | capFunc_elem ) + skip( maybe( plus ) ) ) >> listElem +capFunc_combo = oneplus( ( hidCode_elem | capFunc_elem ) + skip( maybe( plus ) ) ) >> listElem capFunc_sequence = oneplus( ( capFunc_combo | seqString ) + skip( maybe( comma ) ) ) >> oneLayerFlatten # Trigger / Result Codes triggerCode_outerList = scanCode_sequence >> optionExpansion -triggerUSBCode_outerList = usbCode_sequence >> optionExpansion >> usbCodeToCapability -resultCode_outerList = capFunc_sequence >> optionExpansion >> usbCodeToCapability +triggerUSBCode_outerList = usbCode_sequence >> optionExpansion >> hidCodeToCapability +resultCode_outerList = capFunc_sequence >> optionExpansion >> hidCodeToCapability ## Main Rules diff --git a/kll_lib/hid_dict.py b/kll_lib/hid_dict.py index abb3487..d92a6c0 100644 --- a/kll_lib/hid_dict.py +++ b/kll_lib/hid_dict.py @@ -20,483 +20,1470 @@ # Rather than generating tables of hex USB codes for the keymapping tables, readable defines are used (which correspond to usb_hid.h) hid_lookup_dictionary = dict([ - ( 0x00, 'KEY_NOEVENT' ), # Event, not a physical key - ( 0x01, 'KEY_ERRORROLLOVER' ), # Event, not a physical key - ( 0x02, 'KEY_POSTFAIL' ), # Event, not a physical key - ( 0x03, 'KEY_ERRORUNDEFINED' ), # Event, not a physical key - ( 0x04, 'KEY_A' ), - ( 0x05, 'KEY_B' ), - ( 0x06, 'KEY_C' ), - ( 0x07, 'KEY_D' ), - ( 0x08, 'KEY_E' ), - ( 0x09, 'KEY_F' ), - ( 0x0A, 'KEY_G' ), - ( 0x0B, 'KEY_H' ), - ( 0x0C, 'KEY_I' ), - ( 0x0D, 'KEY_J' ), - ( 0x0E, 'KEY_K' ), - ( 0x0F, 'KEY_L' ), - ( 0x10, 'KEY_M' ), - ( 0x11, 'KEY_N' ), - ( 0x12, 'KEY_O' ), - ( 0x13, 'KEY_P' ), - ( 0x14, 'KEY_Q' ), - ( 0x15, 'KEY_R' ), - ( 0x16, 'KEY_S' ), - ( 0x17, 'KEY_T' ), - ( 0x18, 'KEY_U' ), - ( 0x19, 'KEY_V' ), - ( 0x1A, 'KEY_W' ), - ( 0x1B, 'KEY_X' ), - ( 0x1C, 'KEY_Y' ), - ( 0x1D, 'KEY_Z' ), - ( 0x1E, 'KEY_1' ), - ( 0x1F, 'KEY_2' ), - ( 0x20, 'KEY_3' ), - ( 0x21, 'KEY_4' ), - ( 0x22, 'KEY_5' ), - ( 0x23, 'KEY_6' ), - ( 0x24, 'KEY_7' ), - ( 0x25, 'KEY_8' ), - ( 0x26, 'KEY_9' ), - ( 0x27, 'KEY_0' ), - ( 0x28, 'KEY_ENTER' ), - ( 0x29, 'KEY_ESC' ), - ( 0x2A, 'KEY_BACKSPACE' ), - ( 0x2B, 'KEY_TAB' ), - ( 0x2C, 'KEY_SPACE' ), - ( 0x2D, 'KEY_MINUS' ), - ( 0x2E, 'KEY_EQUAL' ), - ( 0x2F, 'KEY_LEFT_BRACE' ), - ( 0x30, 'KEY_RIGHT_BRACE' ), - ( 0x31, 'KEY_BACKSLASH' ), - ( 0x32, 'KEY_NUMBER' ), - ( 0x33, 'KEY_SEMICOLON' ), - ( 0x34, 'KEY_QUOTE' ), - ( 0x35, 'KEY_BACKTICK' ), - ( 0x36, 'KEY_COMMA' ), - ( 0x37, 'KEY_PERIOD' ), - ( 0x38, 'KEY_SLASH' ), - ( 0x39, 'KEY_CAPS_LOCK' ), - ( 0x3A, 'KEY_F1' ), - ( 0x3B, 'KEY_F2' ), - ( 0x3C, 'KEY_F3' ), - ( 0x3D, 'KEY_F4' ), - ( 0x3E, 'KEY_F5' ), - ( 0x3F, 'KEY_F6' ), - ( 0x40, 'KEY_F7' ), - ( 0x41, 'KEY_F8' ), - ( 0x42, 'KEY_F9' ), - ( 0x43, 'KEY_F10' ), - ( 0x44, 'KEY_F11' ), - ( 0x45, 'KEY_F12' ), - ( 0x46, 'KEY_PRINTSCREEN' ), - ( 0x47, 'KEY_SCROLL_LOCK' ), - ( 0x48, 'KEY_PAUSE' ), - ( 0x49, 'KEY_INSERT' ), - ( 0x4A, 'KEY_HOME' ), - ( 0x4B, 'KEY_PAGE_UP' ), - ( 0x4C, 'KEY_DELETE' ), - ( 0x4D, 'KEY_END' ), - ( 0x4E, 'KEY_PAGE_DOWN' ), - ( 0x4F, 'KEY_RIGHT' ), - ( 0x50, 'KEY_LEFT' ), - ( 0x51, 'KEY_DOWN' ), - ( 0x52, 'KEY_UP' ), - ( 0x53, 'KEY_NUM_LOCK' ), - ( 0x54, 'KEYPAD_SLASH' ), - ( 0x55, 'KEYPAD_ASTERISK' ), - ( 0x56, 'KEYPAD_MINUS' ), - ( 0x57, 'KEYPAD_PLUS' ), - ( 0x58, 'KEYPAD_ENTER' ), - ( 0x59, 'KEYPAD_1' ), - ( 0x5A, 'KEYPAD_2' ), - ( 0x5B, 'KEYPAD_3' ), - ( 0x5C, 'KEYPAD_4' ), - ( 0x5D, 'KEYPAD_5' ), - ( 0x5E, 'KEYPAD_6' ), - ( 0x5F, 'KEYPAD_7' ), - ( 0x60, 'KEYPAD_8' ), - ( 0x61, 'KEYPAD_9' ), - ( 0x62, 'KEYPAD_0' ), - ( 0x63, 'KEYPAD_PERIOD' ), - ( 0x64, 'KEY_ISO_SLASH' ), - ( 0x65, 'KEY_APP' ), - ( 0x66, 'KEYBOARD_STATUS' ), # Used for indicating status or errors, not a key - ( 0x67, 'KEYPAD_EQUAL' ), - ( 0x68, 'KEY_F13' ), - ( 0x69, 'KEY_F14' ), - ( 0x6A, 'KEY_F15' ), - ( 0x6B, 'KEY_F16' ), - ( 0x6C, 'KEY_F17' ), - ( 0x6D, 'KEY_F18' ), - ( 0x6E, 'KEY_F19' ), - ( 0x6F, 'KEY_F20' ), - ( 0x70, 'KEY_F21' ), - ( 0x71, 'KEY_F22' ), - ( 0x72, 'KEY_F23' ), - ( 0x73, 'KEY_F24' ), - ( 0x74, 'KEY_EXEC' ), - ( 0x75, 'KEY_HELP' ), - ( 0x76, 'KEY_MENU' ), - ( 0x77, 'KEY_SELECT' ), - ( 0x78, 'KEY_STOP' ), - ( 0x79, 'KEY_AGAIN' ), - ( 0x7A, 'KEY_UNDO' ), - ( 0x7B, 'KEY_CUT' ), - ( 0x7C, 'KEY_COPY' ), - ( 0x7D, 'KEY_PASTE' ), - ( 0x7E, 'KEY_FIND' ), - ( 0x7F, 'KEY_MUTE' ), - ( 0x80, 'KEY_VOL_UP' ), - ( 0x81, 'KEY_VOL_DOWN' ), - ( 0x82, 'KEY_CAPS_TLOCK' ), # Toggle "Locking" Scroll Lock (Old keyboards with Locking Caps Lock) - ( 0x83, 'KEY_NUM_TLOCK' ), - ( 0x84, 'KEY_SCROLL_TLOCK' ), - ( 0x85, 'KEYPAD_COMMA' ), # Brazillian (See spec) - ( 0x86, 'KEYPAD_EQUAL_AS' ), # AS/400 Keyboard (See spec) - ( 0x87, 'KEY_INTER1' ), # KANJI1 - Brazillian and Japanese "Ru" and "-" - ( 0x88, 'KEY_INTER2' ), # KANJI2 - Japanese Katakana/Hiragana - ( 0x89, 'KEY_INTER3' ), # KANJI3 - Japanese Yen - ( 0x8A, 'KEY_INTER4' ), # KANJI4 - Japanese Henkan - ( 0x8B, 'KEY_INTER5' ), # KANJI5 - Japanese Muhenkan - ( 0x8C, 'KEY_INTER6' ), # KANJI6 - PC0x62 Comma (Ka-m-ma) - ( 0x8D, 'KEY_INTER7' ), # KANJI7 - Double-Byte/Single-Byte Toggle - ( 0x8E, 'KEY_INTER8' ), # KANJI8 - Undefined - ( 0x8F, 'KEY_INTER9' ), # KANJI9 - Undefined - ( 0x90, 'KEY_LANG1' ), # Korean Hangul/English Toggle - ( 0x91, 'KEY_LANG2' ), # Korean Hanja Conversion - Japanese Eisu - ( 0x92, 'KEY_LANG3' ), # Japanese Katakana Key (USB) - ( 0x93, 'KEY_LANG4' ), # Japanese Hiragana Key (USB) - ( 0x94, 'KEY_LANG5' ), # Japanese Zenkaku/Hankaku Key (USB) - ( 0x95, 'KEY_LANG6' ), # Reserved (Application Specific) - ( 0x96, 'KEY_LANG7' ), # Reserved (Application Specific) - ( 0x97, 'KEY_LANG8' ), # Reserved (Application Specific) - ( 0x98, 'KEY_LANG9' ), # Reserved (Application Specific) - ( 0x99, 'KEY_ALT_ERASE' ), # Special Erase (See Spec) - ( 0x9A, 'KEY_SYSREQ_ATT' ), # Modifier Type - ( 0x9B, 'KEY_CANCEL' ), - ( 0x9C, 'KEY_CLEAR' ), - ( 0x9D, 'KEY_PRIOR' ), - ( 0x9E, 'KEY_RETURN' ), - ( 0x9F, 'KEY_SEPARATOR' ), - ( 0xA0, 'KEY_OUT' ), - ( 0xA1, 'KEY_OPER' ), - ( 0xA2, 'KEY_CLEAR_AGAIN' ), - ( 0xA3, 'KEY_CRSEL_PROPS' ), - ( 0xA4, 'KEY_EXSEL' ), -# 0xA5 - 0xAF Reserved - ( 0xB0, 'KEYPAD_00' ), - ( 0xB1, 'KEYPAD_000' ), - ( 0xB2, 'KEY_1000_SEP' ), - ( 0xB3, 'KEY_DECIMAL_SEP' ), - ( 0xB4, 'KEY_CURRENCY_MAIN' ), - ( 0xB5, 'KEY_CURRENCY_SUB' ), - ( 0xB6, 'KEYPAD_LPAREN' ), - ( 0xB7, 'KEYPAD_RPAREN' ), - ( 0xB8, 'KEYPAD_LBRACE' ), - ( 0xB9, 'KEYPAD_RBRACE' ), - ( 0xBA, 'KEYPAD_TAB' ), - ( 0xBB, 'KEYPAD_BACKSPACE' ), - ( 0xBC, 'KEYPAD_A' ), - ( 0xBD, 'KEYPAD_B' ), - ( 0xBE, 'KEYPAD_C' ), - ( 0xBF, 'KEYPAD_D' ), - ( 0xC0, 'KEYPAD_E' ), - ( 0xC1, 'KEYPAD_F' ), - ( 0xC2, 'KEYPAD_XOR' ), - ( 0xC3, 'KEYPAD_CHEVRON' ), - ( 0xC4, 'KEYPAD_PERCENT' ), - ( 0xC5, 'KEYPAD_LTHAN' ), - ( 0xC6, 'KEYPAD_GTHAN' ), - ( 0xC7, 'KEYPAD_BITAND' ), - ( 0xC8, 'KEYPAD_AND' ), - ( 0xC9, 'KEYPAD_BITOR' ), - ( 0xCA, 'KEYPAD_OR' ), - ( 0xCB, 'KEYPAD_COLON' ), - ( 0xCC, 'KEYPAD_POUND' ), - ( 0xCD, 'KEYPAD_SPACE' ), - ( 0xCE, 'KEYPAD_AT' ), - ( 0xCF, 'KEYPAD_EXCLAIM' ), - ( 0xD0, 'KEYPAD_MEM_STORE' ), - ( 0xD1, 'KEYPAD_MEM_RECALL' ), - ( 0xD2, 'KEYPAD_MEM_CLEAR' ), - ( 0xD3, 'KEYPAD_MEM_ADD' ), - ( 0xD4, 'KEYPAD_MEM_SUB' ), - ( 0xD5, 'KEYPAD_MEM_MULT' ), - ( 0xD6, 'KEYPAD_MEM_DIV' ), - ( 0xD7, 'KEYPAD_PLUS_MINUS' ), - ( 0xD8, 'KEYPAD_CLEAR' ), - ( 0xD9, 'KEYPAD_CLEAR_ENTRY' ), - ( 0xDA, 'KEYPAD_BINARY' ), - ( 0xDB, 'KEYPAD_OCTAL' ), - ( 0xDC, 'KEYPAD_DECIMAL' ), - ( 0xDD, 'KEYPAD_HEX' ), -# 0xDE - 0xDF Reserved - ( 0xE0, 'KEY_LCTRL' ), - ( 0xE1, 'KEY_LSHIFT' ), - ( 0xE2, 'KEY_LALT' ), - ( 0xE3, 'KEY_LGUI' ), - ( 0xE4, 'KEY_RCTRL' ), - ( 0xE5, 'KEY_RSHIFT' ), - ( 0xE6, 'KEY_RALT' ), - ( 0xE7, 'KEY_RGUI' ), -# 0xE8 - 0xFFFF Reserved, using 0xF0 to 0xFF for function key placeholders - ( 0xF0, 'KEY_FUN1' ), - ( 0xF1, 'KEY_FUN2' ), - ( 0xF2, 'KEY_FUN3' ), - ( 0xF3, 'KEY_FUN4' ), - ( 0xF4, 'KEY_FUN5' ), - ( 0xF5, 'KEY_FUN6' ), - ( 0xF6, 'KEY_FUN7' ), - ( 0xF7, 'KEY_FUN8' ), - ( 0xF8, 'KEY_FUN9' ), - ( 0xF9, 'KEY_FUN10' ), - ( 0xFA, 'KEY_FUN11' ), - ( 0xFB, 'KEY_FUN12' ), - ( 0xFC, 'KEY_FUN13' ), - ( 0xFD, 'KEY_FUN14' ), - ( 0xFE, 'KEY_FUN15' ), - ( 0xFF, 'KEY_FUN16' ), + # USB HID Keyboard Codes + ( ('USB', 0x00), 'KEY_NOEVENT' ), # Event, not a physical key + ( ('USB', 0x01), 'KEY_ERRORROLLOVER' ), # Event, not a physical key + ( ('USB', 0x02), 'KEY_POSTFAIL' ), # Event, not a physical key + ( ('USB', 0x03), 'KEY_ERRORUNDEFINED' ), # Event, not a physical key + ( ('USB', 0x04), 'KEY_A' ), + ( ('USB', 0x05), 'KEY_B' ), + ( ('USB', 0x06), 'KEY_C' ), + ( ('USB', 0x07), 'KEY_D' ), + ( ('USB', 0x08), 'KEY_E' ), + ( ('USB', 0x09), 'KEY_F' ), + ( ('USB', 0x0A), 'KEY_G' ), + ( ('USB', 0x0B), 'KEY_H' ), + ( ('USB', 0x0C), 'KEY_I' ), + ( ('USB', 0x0D), 'KEY_J' ), + ( ('USB', 0x0E), 'KEY_K' ), + ( ('USB', 0x0F), 'KEY_L' ), + ( ('USB', 0x10), 'KEY_M' ), + ( ('USB', 0x11), 'KEY_N' ), + ( ('USB', 0x12), 'KEY_O' ), + ( ('USB', 0x13), 'KEY_P' ), + ( ('USB', 0x14), 'KEY_Q' ), + ( ('USB', 0x15), 'KEY_R' ), + ( ('USB', 0x16), 'KEY_S' ), + ( ('USB', 0x17), 'KEY_T' ), + ( ('USB', 0x18), 'KEY_U' ), + ( ('USB', 0x19), 'KEY_V' ), + ( ('USB', 0x1A), 'KEY_W' ), + ( ('USB', 0x1B), 'KEY_X' ), + ( ('USB', 0x1C), 'KEY_Y' ), + ( ('USB', 0x1D), 'KEY_Z' ), + ( ('USB', 0x1E), 'KEY_1' ), + ( ('USB', 0x1F), 'KEY_2' ), + ( ('USB', 0x20), 'KEY_3' ), + ( ('USB', 0x21), 'KEY_4' ), + ( ('USB', 0x22), 'KEY_5' ), + ( ('USB', 0x23), 'KEY_6' ), + ( ('USB', 0x24), 'KEY_7' ), + ( ('USB', 0x25), 'KEY_8' ), + ( ('USB', 0x26), 'KEY_9' ), + ( ('USB', 0x27), 'KEY_0' ), + ( ('USB', 0x28), 'KEY_ENTER' ), + ( ('USB', 0x29), 'KEY_ESC' ), + ( ('USB', 0x2A), 'KEY_BACKSPACE' ), + ( ('USB', 0x2B), 'KEY_TAB' ), + ( ('USB', 0x2C), 'KEY_SPACE' ), + ( ('USB', 0x2D), 'KEY_MINUS' ), + ( ('USB', 0x2E), 'KEY_EQUAL' ), + ( ('USB', 0x2F), 'KEY_LEFT_BRACE' ), + ( ('USB', 0x30), 'KEY_RIGHT_BRACE' ), + ( ('USB', 0x31), 'KEY_BACKSLASH' ), + ( ('USB', 0x32), 'KEY_NUMBER' ), + ( ('USB', 0x33), 'KEY_SEMICOLON' ), + ( ('USB', 0x34), 'KEY_QUOTE' ), + ( ('USB', 0x35), 'KEY_BACKTICK' ), + ( ('USB', 0x36), 'KEY_COMMA' ), + ( ('USB', 0x37), 'KEY_PERIOD' ), + ( ('USB', 0x38), 'KEY_SLASH' ), + ( ('USB', 0x39), 'KEY_CAPS_LOCK' ), + ( ('USB', 0x3A), 'KEY_F1' ), + ( ('USB', 0x3B), 'KEY_F2' ), + ( ('USB', 0x3C), 'KEY_F3' ), + ( ('USB', 0x3D), 'KEY_F4' ), + ( ('USB', 0x3E), 'KEY_F5' ), + ( ('USB', 0x3F), 'KEY_F6' ), + ( ('USB', 0x40), 'KEY_F7' ), + ( ('USB', 0x41), 'KEY_F8' ), + ( ('USB', 0x42), 'KEY_F9' ), + ( ('USB', 0x43), 'KEY_F10' ), + ( ('USB', 0x44), 'KEY_F11' ), + ( ('USB', 0x45), 'KEY_F12' ), + ( ('USB', 0x46), 'KEY_PRINTSCREEN' ), + ( ('USB', 0x47), 'KEY_SCROLL_LOCK' ), + ( ('USB', 0x48), 'KEY_PAUSE' ), + ( ('USB', 0x49), 'KEY_INSERT' ), + ( ('USB', 0x4A), 'KEY_HOME' ), + ( ('USB', 0x4B), 'KEY_PAGE_UP' ), + ( ('USB', 0x4C), 'KEY_DELETE' ), + ( ('USB', 0x4D), 'KEY_END' ), + ( ('USB', 0x4E), 'KEY_PAGE_DOWN' ), + ( ('USB', 0x4F), 'KEY_RIGHT' ), + ( ('USB', 0x50), 'KEY_LEFT' ), + ( ('USB', 0x51), 'KEY_DOWN' ), + ( ('USB', 0x52), 'KEY_UP' ), + ( ('USB', 0x53), 'KEY_NUM_LOCK' ), + ( ('USB', 0x54), 'KEYPAD_SLASH' ), + ( ('USB', 0x55), 'KEYPAD_ASTERISK' ), + ( ('USB', 0x56), 'KEYPAD_MINUS' ), + ( ('USB', 0x57), 'KEYPAD_PLUS' ), + ( ('USB', 0x58), 'KEYPAD_ENTER' ), + ( ('USB', 0x59), 'KEYPAD_1' ), + ( ('USB', 0x5A), 'KEYPAD_2' ), + ( ('USB', 0x5B), 'KEYPAD_3' ), + ( ('USB', 0x5C), 'KEYPAD_4' ), + ( ('USB', 0x5D), 'KEYPAD_5' ), + ( ('USB', 0x5E), 'KEYPAD_6' ), + ( ('USB', 0x5F), 'KEYPAD_7' ), + ( ('USB', 0x60), 'KEYPAD_8' ), + ( ('USB', 0x61), 'KEYPAD_9' ), + ( ('USB', 0x62), 'KEYPAD_0' ), + ( ('USB', 0x63), 'KEYPAD_PERIOD' ), + ( ('USB', 0x64), 'KEY_ISO_SLASH' ), + ( ('USB', 0x65), 'KEY_APP' ), + ( ('USB', 0x66), 'KEYBOARD_STATUS' ), # Used for indicating status or errors, not a key + ( ('USB', 0x67), 'KEYPAD_EQUAL' ), + ( ('USB', 0x68), 'KEY_F13' ), + ( ('USB', 0x69), 'KEY_F14' ), + ( ('USB', 0x6A), 'KEY_F15' ), + ( ('USB', 0x6B), 'KEY_F16' ), + ( ('USB', 0x6C), 'KEY_F17' ), + ( ('USB', 0x6D), 'KEY_F18' ), + ( ('USB', 0x6E), 'KEY_F19' ), + ( ('USB', 0x6F), 'KEY_F20' ), + ( ('USB', 0x70), 'KEY_F21' ), + ( ('USB', 0x71), 'KEY_F22' ), + ( ('USB', 0x72), 'KEY_F23' ), + ( ('USB', 0x73), 'KEY_F24' ), + ( ('USB', 0x74), 'KEY_EXEC' ), + ( ('USB', 0x75), 'KEY_HELP' ), + ( ('USB', 0x76), 'KEY_MENU' ), + ( ('USB', 0x77), 'KEY_SELECT' ), + ( ('USB', 0x78), 'KEY_STOP' ), + ( ('USB', 0x79), 'KEY_AGAIN' ), + ( ('USB', 0x7A), 'KEY_UNDO' ), + ( ('USB', 0x7B), 'KEY_CUT' ), + ( ('USB', 0x7C), 'KEY_COPY' ), + ( ('USB', 0x7D), 'KEY_PASTE' ), + ( ('USB', 0x7E), 'KEY_FIND' ), + ( ('USB', 0x7F), 'KEY_MUTE' ), + ( ('USB', 0x80), 'KEY_VOL_UP' ), + ( ('USB', 0x81), 'KEY_VOL_DOWN' ), + ( ('USB', 0x82), 'KEY_CAPS_TLOCK' ), # Toggle "Locking" Scroll Lock (Old keyboards with Locking Caps Lock) + ( ('USB', 0x83), 'KEY_NUM_TLOCK' ), + ( ('USB', 0x84), 'KEY_SCROLL_TLOCK' ), + ( ('USB', 0x85), 'KEYPAD_COMMA' ), # Brazillian (See spec) + ( ('USB', 0x86), 'KEYPAD_EQUAL_AS' ), # AS/400 Keyboard (See spec) + ( ('USB', 0x87), 'KEY_INTER1' ), # KANJI1 - Brazillian and Japanese "Ru" and "-" + ( ('USB', 0x88), 'KEY_INTER2' ), # KANJI2 - Japanese Katakana/Hiragana + ( ('USB', 0x89), 'KEY_INTER3' ), # KANJI3 - Japanese Yen + ( ('USB', 0x8A), 'KEY_INTER4' ), # KANJI4 - Japanese Henkan + ( ('USB', 0x8B), 'KEY_INTER5' ), # KANJI5 - Japanese Muhenkan + ( ('USB', 0x8C), 'KEY_INTER6' ), # KANJI6 - PC('USB', 0x62) Comma (Ka-m-ma) + ( ('USB', 0x8D), 'KEY_INTER7' ), # KANJI7 - Double-Byte/Single-Byte Toggle + ( ('USB', 0x8E), 'KEY_INTER8' ), # KANJI8 - Undefined + ( ('USB', 0x8F), 'KEY_INTER9' ), # KANJI9 - Undefined + ( ('USB', 0x90), 'KEY_LANG1' ), # Korean Hangul/English Toggle + ( ('USB', 0x91), 'KEY_LANG2' ), # Korean Hanja Conversion - Japanese Eisu + ( ('USB', 0x92), 'KEY_LANG3' ), # Japanese Katakana Key (USB) + ( ('USB', 0x93), 'KEY_LANG4' ), # Japanese Hiragana Key (USB) + ( ('USB', 0x94), 'KEY_LANG5' ), # Japanese Zenkaku/Hankaku Key (USB) + ( ('USB', 0x95), 'KEY_LANG6' ), # Reserved (Application Specific) + ( ('USB', 0x96), 'KEY_LANG7' ), # Reserved (Application Specific) + ( ('USB', 0x97), 'KEY_LANG8' ), # Reserved (Application Specific) + ( ('USB', 0x98), 'KEY_LANG9' ), # Reserved (Application Specific) + ( ('USB', 0x99), 'KEY_ALT_ERASE' ), # Special Erase (See Spec) + ( ('USB', 0x9A), 'KEY_SYSREQ_ATT' ), # Modifier Type + ( ('USB', 0x9B), 'KEY_CANCEL' ), + ( ('USB', 0x9C), 'KEY_CLEAR' ), + ( ('USB', 0x9D), 'KEY_PRIOR' ), + ( ('USB', 0x9E), 'KEY_RETURN' ), + ( ('USB', 0x9F), 'KEY_SEPARATOR' ), + ( ('USB', 0xA0), 'KEY_OUT' ), + ( ('USB', 0xA1), 'KEY_OPER' ), + ( ('USB', 0xA2), 'KEY_CLEAR_AGAIN' ), + ( ('USB', 0xA3), 'KEY_CRSEL_PROPS' ), + ( ('USB', 0xA4), 'KEY_EXSEL' ), +# ('USB', 0xA5) - ('USB', 0xAF) Reserved + ( ('USB', 0xB0), 'KEYPAD_00' ), + ( ('USB', 0xB1), 'KEYPAD_000' ), + ( ('USB', 0xB2), 'KEY_1000_SEP' ), + ( ('USB', 0xB3), 'KEY_DECIMAL_SEP' ), + ( ('USB', 0xB4), 'KEY_CURRENCY_MAIN' ), + ( ('USB', 0xB5), 'KEY_CURRENCY_SUB' ), + ( ('USB', 0xB6), 'KEYPAD_LPAREN' ), + ( ('USB', 0xB7), 'KEYPAD_RPAREN' ), + ( ('USB', 0xB8), 'KEYPAD_LBRACE' ), + ( ('USB', 0xB9), 'KEYPAD_RBRACE' ), + ( ('USB', 0xBA), 'KEYPAD_TAB' ), + ( ('USB', 0xBB), 'KEYPAD_BACKSPACE' ), + ( ('USB', 0xBC), 'KEYPAD_A' ), + ( ('USB', 0xBD), 'KEYPAD_B' ), + ( ('USB', 0xBE), 'KEYPAD_C' ), + ( ('USB', 0xBF), 'KEYPAD_D' ), + ( ('USB', 0xC0), 'KEYPAD_E' ), + ( ('USB', 0xC1), 'KEYPAD_F' ), + ( ('USB', 0xC2), 'KEYPAD_XOR' ), + ( ('USB', 0xC3), 'KEYPAD_CHEVRON' ), + ( ('USB', 0xC4), 'KEYPAD_PERCENT' ), + ( ('USB', 0xC5), 'KEYPAD_LTHAN' ), + ( ('USB', 0xC6), 'KEYPAD_GTHAN' ), + ( ('USB', 0xC7), 'KEYPAD_BITAND' ), + ( ('USB', 0xC8), 'KEYPAD_AND' ), + ( ('USB', 0xC9), 'KEYPAD_BITOR' ), + ( ('USB', 0xCA), 'KEYPAD_OR' ), + ( ('USB', 0xCB), 'KEYPAD_COLON' ), + ( ('USB', 0xCC), 'KEYPAD_POUND' ), + ( ('USB', 0xCD), 'KEYPAD_SPACE' ), + ( ('USB', 0xCE), 'KEYPAD_AT' ), + ( ('USB', 0xCF), 'KEYPAD_EXCLAIM' ), + ( ('USB', 0xD0), 'KEYPAD_MEM_STORE' ), + ( ('USB', 0xD1), 'KEYPAD_MEM_RECALL' ), + ( ('USB', 0xD2), 'KEYPAD_MEM_CLEAR' ), + ( ('USB', 0xD3), 'KEYPAD_MEM_ADD' ), + ( ('USB', 0xD4), 'KEYPAD_MEM_SUB' ), + ( ('USB', 0xD5), 'KEYPAD_MEM_MULT' ), + ( ('USB', 0xD6), 'KEYPAD_MEM_DIV' ), + ( ('USB', 0xD7), 'KEYPAD_PLUS_MINUS' ), + ( ('USB', 0xD8), 'KEYPAD_CLEAR' ), + ( ('USB', 0xD9), 'KEYPAD_CLEAR_ENTRY' ), + ( ('USB', 0xDA), 'KEYPAD_BINARY' ), + ( ('USB', 0xDB), 'KEYPAD_OCTAL' ), + ( ('USB', 0xDC), 'KEYPAD_DECIMAL' ), + ( ('USB', 0xDD), 'KEYPAD_HEX' ), +# ('USB', 0xDE) - ('USB', 0xDF) Reserved + ( ('USB', 0xE0), 'KEY_LCTRL' ), + ( ('USB', 0xE1), 'KEY_LSHIFT' ), + ( ('USB', 0xE2), 'KEY_LALT' ), + ( ('USB', 0xE3), 'KEY_LGUI' ), + ( ('USB', 0xE4), 'KEY_RCTRL' ), + ( ('USB', 0xE5), 'KEY_RSHIFT' ), + ( ('USB', 0xE6), 'KEY_RALT' ), + ( ('USB', 0xE7), 'KEY_RGUI' ), +# ('USB', 0xE8) - ('USB', 0xFF)FF Reserved, using ('USB', 0xF0) to ('USB', 0xFF) for function key placeholders + ( ('USB', 0xF0), 'KEY_FUN1' ), + ( ('USB', 0xF1), 'KEY_FUN2' ), + ( ('USB', 0xF2), 'KEY_FUN3' ), + ( ('USB', 0xF3), 'KEY_FUN4' ), + ( ('USB', 0xF4), 'KEY_FUN5' ), + ( ('USB', 0xF5), 'KEY_FUN6' ), + ( ('USB', 0xF6), 'KEY_FUN7' ), + ( ('USB', 0xF7), 'KEY_FUN8' ), + ( ('USB', 0xF8), 'KEY_FUN9' ), + ( ('USB', 0xF9), 'KEY_FUN10' ), + ( ('USB', 0xFA), 'KEY_FUN11' ), + ( ('USB', 0xFB), 'KEY_FUN12' ), + ( ('USB', 0xFC), 'KEY_FUN13' ), + ( ('USB', 0xFD), 'KEY_FUN14' ), + ( ('USB', 0xFE), 'KEY_FUN15' ), + ( ('USB', 0xFF), 'KEY_FUN16' ), + + # USB HID Consumer Control Codes +# List of Consumer Codes - USB HID 1.12v2 +# Only listing relevant ones, let me know if you need more -HaaTa +# NKRO HID Supports 0x020 - 0x29C + ( ('CONS', 0x020), 'CONSUMER_10' ), + ( ('CONS', 0x021), 'CONSUMER_100' ), + ( ('CONS', 0x022), 'CONSUMER_AM_PM' ), +# 0x023 - 0x03F Reserved + ( ('CONS', 0x030), 'CONSUMER_POWER' ), + ( ('CONS', 0x031), 'CONSUMER_RESET' ), + ( ('CONS', 0x032), 'CONSUMER_SLEEP' ), + ( ('CONS', 0x033), 'CONSUMER_SLEEP_AFTER' ), + ( ('CONS', 0x034), 'CONSUMER_SLEEP_MODE' ), + ( ('CONS', 0x035), 'CONSUMER_ILLUMINATION' ), + +# 0x037 - 0x03F Reserved + ( ('CONS', 0x040), 'CONSUMER_MENU' ), + ( ('CONS', 0x041), 'CONSUMER_MENU_PICK' ), + ( ('CONS', 0x042), 'CONSUMER_MENU_UP' ), + ( ('CONS', 0x043), 'CONSUMER_MENU_DOWN' ), + ( ('CONS', 0x044), 'CONSUMER_MENU_LEFT' ), + ( ('CONS', 0x045), 'CONSUMER_MENU_RIGHT' ), + ( ('CONS', 0x046), 'CONSUMER_MENU_ESCAPE' ), + ( ('CONS', 0x047), 'CONSUMER_MENU_VALUE_INCREASE' ), + ( ('CONS', 0x048), 'CONSUMER_MENU_VALUE_DECREASE' ), +# 0x049 - 0x05F Reserved + ( ('CONS', 0x060), 'CONSUMER_DATA_ON_SCREEN' ), + ( ('CONS', 0x061), 'CONSUMER_CLOSED_CAPTION' ), + ( ('CONS', 0x062), 'CONSUMER_CLOSED_CAPTION_SELECT' ), + ( ('CONS', 0x063), 'CONSUMER_VCR_TV' ), + ( ('CONS', 0x064), 'CONSUMER_BROADCAST_MODE' ), + ( ('CONS', 0x065), 'CONSUMER_SNAPSHOT' ), + ( ('CONS', 0x066), 'CONSUMER_STILL' ), +# 0x067 - 0x07F Reserved + + ( ('CONS', 0x081), 'CONSUMER_ASSIGN_SELECTION' ), + ( ('CONS', 0x082), 'CONSUMER_MODE_STEP' ), + ( ('CONS', 0x083), 'CONSUMER_RECALL_LAST' ), + ( ('CONS', 0x084), 'CONSUMER_ENTER_CHANNEL' ), + ( ('CONS', 0x085), 'CONSUMER_ORDER_MOVIE' ), + + ( ('CONS', 0x088), 'CONSUMER_MEDIA_COMPUTER' ), + ( ('CONS', 0x089), 'CONSUMER_MEDIA_TV' ), + ( ('CONS', 0x08A), 'CONSUMER_MEDIA_WWW' ), + ( ('CONS', 0x08B), 'CONSUMER_MEDIA_DVD' ), + ( ('CONS', 0x08C), 'CONSUMER_MEDIA_TELEPHONE' ), + ( ('CONS', 0x08D), 'CONSUMER_MEDIA_PROGRAM_GUIDE' ), + ( ('CONS', 0x08E), 'CONSUMER_MEDIA_VIDEO_PHONE' ), + ( ('CONS', 0x08F), 'CONSUMER_MEDIA_SELECT_GAMES' ), + ( ('CONS', 0x090), 'CONSUMER_MEDIA_SELECT_MESSAGES' ), + ( ('CONS', 0x091), 'CONSUMER_MEDIA_SELECT_CD' ), + ( ('CONS', 0x092), 'CONSUMER_MEDIA_SELECT_VCR' ), + ( ('CONS', 0x093), 'CONSUMER_MEDIA_SELECT_TUNER' ), + ( ('CONS', 0x094), 'CONSUMER_QUIT' ), + ( ('CONS', 0x095), 'CONSUMER_HELP' ), + ( ('CONS', 0x096), 'CONSUMER_MEDIA_SELECT_TAPE' ), + ( ('CONS', 0x097), 'CONSUMER_MEDIA_SELECT_CABLE' ), + ( ('CONS', 0x098), 'CONSUMER_MEDIA_SELECT_SATELLITE' ), + ( ('CONS', 0x099), 'CONSUMER_MEDIA_SELECT_SECURITY' ), + ( ('CONS', 0x09A), 'CONSUMER_MEDIA_SELECT_HOME' ), + ( ('CONS', 0x09B), 'CONSUMER_MEDIA_SELECT_CALL' ), + ( ('CONS', 0x09C), 'CONSUMER_CHANNEL_INCREMENT' ), + ( ('CONS', 0x09D), 'CONSUMER_CAHNNEL_DECREMENT' ), + ( ('CONS', 0x09E), 'CONSUMER_MEDIA_SELECT_SAP' ), +# 0x09F Reserved + ( ('CONS', 0x0A0), 'CONSUMER_VCR_PLUS' ), + ( ('CONS', 0x0A1), 'CONSUMER_ONCE' ), + ( ('CONS', 0x0A2), 'CONSUMER_DAILY' ), + ( ('CONS', 0x0A3), 'CONSUMER_WEEKLY' ), + ( ('CONS', 0x0A4), 'CONSUMER_MONTHLY' ), +# 0x0A5 - 0x0AF Reserved + ( ('CONS', 0x0B0), 'CONSUMER_PLAY' ), + ( ('CONS', 0x0B1), 'CONSUMER_PAUSE' ), + ( ('CONS', 0x0B2), 'CONSUMER_RECORD' ), + ( ('CONS', 0x0B3), 'CONSUMER_FAST_FORWARD' ), + ( ('CONS', 0x0B4), 'CONSUMER_REWIND' ), + ( ('CONS', 0x0B5), 'CONSUMER_SCAN_NEXT_TRACK' ), + ( ('CONS', 0x0B6), 'CONSUMER_SCAN_PREVIOUS_TRACK' ), + ( ('CONS', 0x0B7), 'CONSUMER_STOP' ), + ( ('CONS', 0x0B8), 'CONSUMER_EJECT' ), + ( ('CONS', 0x0B9), 'CONSUMER_RANDOM_PLAY' ), + + ( ('CONS', 0x0BC), 'CONSUMER_REPEAT' ), + + ( ('CONS', 0x0BE), 'CONSUMER_TRACK_NORMAL' ), + + ( ('CONS', 0x0C0), 'CONSUMER_FRAME_FORWARD' ), + ( ('CONS', 0x0C1), 'CONSUMER_FRAME_BACK' ), + ( ('CONS', 0x0C2), 'CONSUMER_MARK' ), + ( ('CONS', 0x0C3), 'CONSUMER_CLEAR_MARK' ), + ( ('CONS', 0x0C4), 'CONSUMER_REPEAT_FROM_MARK' ), + ( ('CONS', 0x0C5), 'CONSUMER_RETURN_TO_MARK' ), + ( ('CONS', 0x0C6), 'CONSUMER_SEARCH_MARK_FORWARDS' ), + ( ('CONS', 0x0C7), 'CONSUMER_SEARCH_MARK_BACKWARDS' ), + ( ('CONS', 0x0C8), 'CONSUMER_COUNTER_RESET' ), + ( ('CONS', 0x0C9), 'CONSUMER_SHOW_COUNTER' ), + ( ('CONS', 0x0CA), 'CONSUMER_TRACKING_INCREMENT' ), + ( ('CONS', 0x0CB), 'CONSUMER_TRACKING_DECREMENT' ), + ( ('CONS', 0x0CC), 'CONSUMER_STOP_EJECT' ), + ( ('CONS', 0x0CD), 'CONSUMER_PAUSE_PLAY' ), + ( ('CONS', 0x0CE), 'CONSUMER_PLAY_SKIP' ), +# 0x0CF - 0x0DF Reserved + + ( ('CONS', 0x0E2), 'CONSUMER_MUTE' ), + + ( ('CONS', 0x0E5), 'CONSUMER_BASS_BOOST' ), + ( ('CONS', 0x0E6), 'CONSUMER_SURROUND_MODE' ), + ( ('CONS', 0x0E7), 'CONSUMER_LOUDNESS' ), + ( ('CONS', 0x0E8), 'CONSUMER_MPX' ), + ( ('CONS', 0x0E9), 'CONSUMER_VOLUME_UP' ), + ( ('CONS', 0x0EA), 'CONSUMER_VOLUME_DOWN' ), +# 0x0EB - 0x0EF Reserved + ( ('CONS', 0x0F0), 'CONSUMER_SPEED_SELECT' ), + ( ('CONS', 0x0F2), 'CONSUMER_STANDARD_PLAY' ), + ( ('CONS', 0x0F3), 'CONSUMER_LONG_PLAY' ), + ( ('CONS', 0x0F4), 'CONSUMER_EXTENDED_PLAY' ), + ( ('CONS', 0x0F5), 'CONSUMER_SLOW' ), +# 0x0F6 - 0x0FF + ( ('CONS', 0x100), 'CONSUMER_FAN_ENABLE' ), + + ( ('CONS', 0x102), 'CONSUMER_LIGHT_ENABLE' ), + + ( ('CONS', 0x104), 'CONSUMER_CLIMATE_CONTROL_ENABLE' ), + + ( ('CONS', 0x106), 'CONSUMER_SECURITY_ENABLE' ), + ( ('CONS', 0x107), 'CONSUMER_FIRE_ALARM' ), + + ( ('CONS', 0x10A), 'CONSUMER_MOTION' ), + ( ('CONS', 0x10B), 'CONSUMER_DURESS_ALARM' ), + ( ('CONS', 0x10C), 'CONSUMER_HOLDUP_ALARM' ), + ( ('CONS', 0x10D), 'CONSUMER_MEDICAL_ALARM' ), +# 0x10E - 0x14F Reserved + ( ('CONS', 0x150), 'CONSUMER_BALANCE_RIGHT' ), + ( ('CONS', 0x151), 'CONSUMER_BALANCE_LEFT' ), + ( ('CONS', 0x152), 'CONSUMER_BASS_INCR' ), + ( ('CONS', 0x153), 'CONSUMER_BASS_DECR' ), + ( ('CONS', 0x154), 'CONSUMER_TREBLE_INCR' ), + ( ('CONS', 0x155), 'CONSUMER_TREBLE_DECR' ), +# 0x156 - 0x15F Reserved + + ( ('CONS', 0x171), 'CONSUMER_SUB_CHANNEL_INCREMENT' ), + ( ('CONS', 0x172), 'CONSUMER_SUB_CHANNEL_DECREMENT' ), + ( ('CONS', 0x173), 'CONSUMER_ALT_AUDIO_INCREMENT' ), + ( ('CONS', 0x174), 'CONSUMER_ALT_AUDIO_DECREMENT' ), + +# List of Consumer Codes - USB HID 1.12v2 +# Application Launch Buttons pg 79 + ( ('CONS', 0x181), 'AL_LAUNCH_BUTTON_CONFIG_TOOL' ), + ( ('CONS', 0x182), 'AL_PROGRAMMABLE_BUTTON_CONFIG' ), + ( ('CONS', 0x183), 'AL_CONSUMER_CONTROL_CONFIG' ), + ( ('CONS', 0x184), 'AL_WORD_PROCESSOR' ), + ( ('CONS', 0x185), 'AL_TEXT_EDITOR' ), + ( ('CONS', 0x186), 'AL_SPREADSHEET' ), + ( ('CONS', 0x187), 'AL_GRAPHICS_EDITOR' ), + ( ('CONS', 0x188), 'AL_PRESENTATION_APP' ), + ( ('CONS', 0x189), 'AL_DATABASE_APP' ), + ( ('CONS', 0x18A), 'AL_EMAIL_READER' ), + ( ('CONS', 0x18B), 'AL_NEWSREADER' ), + ( ('CONS', 0x18C), 'AL_VOICEMAIL' ), + ( ('CONS', 0x18D), 'AL_CONTACTS_ADDRESS_BOOK' ), + ( ('CONS', 0x18E), 'AL_CALENDAR_SCHEDULE' ), + ( ('CONS', 0x18F), 'AL_TASK_PROJECT_MANAGER' ), + ( ('CONS', 0x190), 'AL_LOG_JOURNAL_TIMECARD' ), + ( ('CONS', 0x191), 'AL_CHECKBOOK_FINANCE' ), + ( ('CONS', 0x192), 'AL_CALCULATOR' ), + ( ('CONS', 0x193), 'AL_A_V_CAPTURE_PLAYBACK' ), + ( ('CONS', 0x194), 'AL_LOCAL_MACHINE_BROWSER' ), + ( ('CONS', 0x195), 'AL_LAN_WAN_BROWSER' ), + ( ('CONS', 0x196), 'AL_INTERNET_BROWSER' ), + ( ('CONS', 0x197), 'AL_REMOTE_NETWORKING_ISP_CONNECT' ), + ( ('CONS', 0x198), 'AL_NETWORK_CONFERENCE' ), + ( ('CONS', 0x199), 'AL_NETWORK_CHAT' ), + ( ('CONS', 0x19A), 'AL_TELEPHONY_DIALER' ), + ( ('CONS', 0x19B), 'AL_LOGON' ), + ( ('CONS', 0x19C), 'AL_LOGOFF' ), + ( ('CONS', 0x19D), 'AL_LOGON_LOGOFF' ), + ( ('CONS', 0x19E), 'AL_TERMINAL_LOCK_SCREENSAVER' ), + ( ('CONS', 0x19F), 'AL_CONTROL_PANEL' ), + ( ('CONS', 0x1A0), 'AL_COMMAND_LINE_PROCESSOR_RUN' ), + ( ('CONS', 0x1A1), 'AL_PROCESS_TASK_MANAGER' ), + ( ('CONS', 0x1A2), 'AL_SELECT_TAST_APP' ), + ( ('CONS', 0x1A3), 'AL_NEXT_TASK_APP' ), + ( ('CONS', 0x1A4), 'AL_PREVIOUS_TASK_APP' ), + ( ('CONS', 0x1A5), 'AL_PREEMPTIVE_HALT_TASK_APP' ), + ( ('CONS', 0x1A6), 'AL_INTEGRATED_HELP_CENTER' ), + ( ('CONS', 0x1A7), 'AL_DOCUMENTS' ), + ( ('CONS', 0x1A8), 'AL_THESAURUS' ), + ( ('CONS', 0x1A9), 'AL_DICTIONARY' ), + ( ('CONS', 0x1AA), 'AL_DESKTOP' ), + ( ('CONS', 0x1AB), 'AL_SPELL_CHECK' ), + ( ('CONS', 0x1AC), 'AL_GRAMMAR_CHECK' ), + ( ('CONS', 0x1AD), 'AL_WIRELESS_STATUS' ), + ( ('CONS', 0x1AE), 'AL_KEYBOARD_LAYOUT' ), + ( ('CONS', 0x1AF), 'AL_VIRUS_PROTECTION' ), + ( ('CONS', 0x1B0), 'AL_ENCRYPTION' ), + ( ('CONS', 0x1B1), 'AL_SCREEN_SAVER' ), + ( ('CONS', 0x1B2), 'AL_ALARMS' ), + ( ('CONS', 0x1B3), 'AL_CLOCK' ), + ( ('CONS', 0x1B4), 'AL_FILE_BROWSER' ), + ( ('CONS', 0x1B5), 'AL_POWER_STATUS' ), + ( ('CONS', 0x1B6), 'AL_IMAGE_BROWSER' ), + ( ('CONS', 0x1B7), 'AL_AUDIO_BROWSER' ), + ( ('CONS', 0x1B8), 'AL_MOVIE_BROWSER' ), + ( ('CONS', 0x1B9), 'AL_DIGITAL_RIGHTS_MANAGER' ), + ( ('CONS', 0x1BA), 'AL_DIGITAL_WALLET' ), +# 0x1BB Reserved + ( ('CONS', 0x1BC), 'AL_INSTANT_MESSAGING' ), + ( ('CONS', 0x1BD), 'AL_OEM_FEATURES_TIPS_TUTORIAL' ), + ( ('CONS', 0x1BE), 'AL_OEM_HELP' ), + ( ('CONS', 0x1BF), 'AL_ONLINE_COMMUNITY' ), + ( ('CONS', 0x1C0), 'AL_ENTERTAINMENT_CONTENT' ), + ( ('CONS', 0x1C1), 'AL_ONLINE_SHOPPING' ), + ( ('CONS', 0x1C2), 'AL_SMARTCARD_INFO_HELP' ), + ( ('CONS', 0x1C3), 'AL_MARKET_MONITOR' ), + ( ('CONS', 0x1C4), 'AL_CUSTOMIZED_CORP_NEWS' ), + ( ('CONS', 0x1C5), 'AL_ONLINE_ACTIVITY' ), + ( ('CONS', 0x1C6), 'AL_SEARCH_BROWSER' ), + ( ('CONS', 0x1C7), 'AL_AUDIO_PLAYER' ), + +# List of Consumer Codes - USB HID 1.12v2 +# Generic GUI Application Controls pg 82 + ( ('CONS', 0x201), 'AC_NEW' ), + ( ('CONS', 0x202), 'AC_OPEN' ), + ( ('CONS', 0x203), 'AC_CLOSE' ), + ( ('CONS', 0x204), 'AC_EXIT' ), + ( ('CONS', 0x205), 'AC_MAXIMIZE' ), + ( ('CONS', 0x206), 'AC_MINIMIZE' ), + ( ('CONS', 0x207), 'AC_SAVE' ), + ( ('CONS', 0x208), 'AC_PRINT' ), + ( ('CONS', 0x209), 'AC_PROPERTIES' ), + ( ('CONS', 0x21A), 'AC_UNDO' ), + ( ('CONS', 0x21B), 'AC_COPY' ), + ( ('CONS', 0x21C), 'AC_CUT' ), + ( ('CONS', 0x21D), 'AC_PASTE' ), + ( ('CONS', 0x21E), 'AC_SELECT_ALL' ), + ( ('CONS', 0x21F), 'AC_FIND' ), + ( ('CONS', 0x220), 'AC_FIND_AND_REPLACE' ), + ( ('CONS', 0x221), 'AC_SEARCH' ), + ( ('CONS', 0x222), 'AC_GO_TO' ), + ( ('CONS', 0x223), 'AC_HOME' ), + ( ('CONS', 0x224), 'AC_BACK' ), + ( ('CONS', 0x225), 'AC_FORWARD' ), + ( ('CONS', 0x226), 'AC_STOP' ), + ( ('CONS', 0x227), 'AC_REFRESH' ), + ( ('CONS', 0x228), 'AC_PREVIOUS_LINK' ), + ( ('CONS', 0x229), 'AC_NEXT_LINK' ), + ( ('CONS', 0x22A), 'AC_BOOKMARKS' ), + ( ('CONS', 0x22B), 'AC_HISTORY' ), + ( ('CONS', 0x22C), 'AC_SUBSCRIPTIONS' ), + ( ('CONS', 0x22D), 'AC_ZOOM_IN' ), + ( ('CONS', 0x22E), 'AC_ZOOM_OUT' ), + ( ('CONS', 0x22F), 'AC_ZOOM' ), + ( ('CONS', 0x230), 'AC_FULL_SCREEN_VIEW' ), + ( ('CONS', 0x231), 'AC_NORMAL_VIEW' ), + ( ('CONS', 0x232), 'AC_VIEW_TOGGLE' ), + ( ('CONS', 0x233), 'AC_SCROLL_UP' ), + ( ('CONS', 0x234), 'AC_SCROLL_DOWN' ), + ( ('CONS', 0x235), 'AC_SCROLL' ), + ( ('CONS', 0x236), 'AC_PAN_LEFT' ), + ( ('CONS', 0x237), 'AC_PAN_RIGHT' ), + ( ('CONS', 0x238), 'AC_PAN' ), + ( ('CONS', 0x239), 'AC_NEW_WINDOW' ), + ( ('CONS', 0x23A), 'AC_TILE_HORIZONTALLY' ), + ( ('CONS', 0x23B), 'AC_TILE_VERTICALLY' ), + ( ('CONS', 0x23C), 'AC_FORMAT' ), + ( ('CONS', 0x23D), 'AC_EDIT' ), + ( ('CONS', 0x23E), 'AC_BOLD' ), + ( ('CONS', 0x23F), 'AC_ITALICS' ), + ( ('CONS', 0x240), 'AC_UNDERLINE' ), + ( ('CONS', 0x241), 'AC_STRIKETHROUGH' ), + ( ('CONS', 0x242), 'AC_SUBSCRIPT' ), + ( ('CONS', 0x243), 'AC_SUPERSCRIPT' ), + ( ('CONS', 0x244), 'AC_ALL_CAPS' ), + ( ('CONS', 0x245), 'AC_ROTATE' ), + ( ('CONS', 0x246), 'AC_RESIZE' ), + ( ('CONS', 0x247), 'AC_FILP_HORIZONTAL' ), + ( ('CONS', 0x248), 'AC_FILP_VERTICAL' ), + ( ('CONS', 0x249), 'AC_MIRROR_HORIZONTAL' ), + ( ('CONS', 0x24A), 'AC_MIRROR_VERTICAL' ), + ( ('CONS', 0x24B), 'AC_FONT_SELECT' ), + ( ('CONS', 0x24C), 'AC_FONT_COLOR' ), + ( ('CONS', 0x24D), 'AC_FONT_SIZE' ), + ( ('CONS', 0x24E), 'AC_JUSTIFY_LEFT' ), + ( ('CONS', 0x24F), 'AC_JUSTIFY_CENTER_H' ), + ( ('CONS', 0x250), 'AC_JUSTIFY_RIGHT' ), + ( ('CONS', 0x251), 'AC_JUSTIFY_BLOCK_H' ), + ( ('CONS', 0x252), 'AC_JUSTIFY_TOP' ), + ( ('CONS', 0x253), 'AC_JUSTIFY_CENTER_V' ), + ( ('CONS', 0x254), 'AC_JUSTIFY_BOTTOM' ), + ( ('CONS', 0x255), 'AC_JUSTIFY_BLOCK_V' ), + ( ('CONS', 0x256), 'AC_INDENT_DECREASE' ), + ( ('CONS', 0x257), 'AC_INDENT_INCREASE' ), + ( ('CONS', 0x258), 'AC_NUMBERED_LIST' ), + ( ('CONS', 0x259), 'AC_RESTART_NUMBERING' ), + ( ('CONS', 0x25A), 'AC_BULLETED_LIST' ), + ( ('CONS', 0x25B), 'AC_PROMOTE' ), + ( ('CONS', 0x25C), 'AC_DEMOTE' ), + ( ('CONS', 0x25D), 'AC_YES' ), + ( ('CONS', 0x25E), 'AC_NO' ), + ( ('CONS', 0x25F), 'AC_CANCEL' ), + ( ('CONS', 0x260), 'AC_CATALOG' ), + ( ('CONS', 0x261), 'AC_BUY_CHECKOUT' ), + ( ('CONS', 0x262), 'AC_ADD_TO_CART' ), + ( ('CONS', 0x263), 'AC_EXPAND' ), + ( ('CONS', 0x264), 'AC_EXPAND_ALL' ), + ( ('CONS', 0x265), 'AC_COLLAPSE' ), + ( ('CONS', 0x266), 'AC_COLLAPSE_ALL' ), + ( ('CONS', 0x267), 'AC_PRINT_PREVIEW' ), + ( ('CONS', 0x268), 'AC_PASTE_SPECIAL' ), + ( ('CONS', 0x269), 'AC_INSERT_MODE' ), + ( ('CONS', 0x26A), 'AC_DELETE' ), + ( ('CONS', 0x26B), 'AC_LOCK' ), + ( ('CONS', 0x26C), 'AC_UNLOCK' ), + ( ('CONS', 0x26D), 'AC_PROTECT' ), + ( ('CONS', 0x26E), 'AC_UNPROTECT' ), + ( ('CONS', 0x26F), 'AC_ATTACH_COMMENT' ), + ( ('CONS', 0x270), 'AC_DELETE_COMMENT' ), + ( ('CONS', 0x271), 'AC_VIEW_COMMENT' ), + ( ('CONS', 0x272), 'AC_SELECT_WORD' ), + ( ('CONS', 0x273), 'AC_SELECT_SENTENCE' ), + ( ('CONS', 0x274), 'AC_SELECT_PARAGRAPH' ), + ( ('CONS', 0x275), 'AC_SELECT_COLUMN' ), + ( ('CONS', 0x276), 'AC_SELECT_ROW' ), + ( ('CONS', 0x277), 'AC_SELECT_TABLE' ), + ( ('CONS', 0x278), 'AC_SELECT_OBJECT' ), + ( ('CONS', 0x279), 'AC_REDO_REPEAT' ), + ( ('CONS', 0x27A), 'AC_SORT' ), + ( ('CONS', 0x27B), 'AC_SORT_ASCENDING' ), + ( ('CONS', 0x27C), 'AC_SORT_DESCENDING' ), + ( ('CONS', 0x27D), 'AC_FILTER' ), + ( ('CONS', 0x27E), 'AC_SET_CLOCK' ), + ( ('CONS', 0x27F), 'AC_VIEW_CLOCK' ), + ( ('CONS', 0x280), 'AC_SELECT_TIME_ZONE' ), + ( ('CONS', 0x281), 'AC_EDIT_TIME_ZONE' ), + ( ('CONS', 0x282), 'AC_SET_ALARM' ), + ( ('CONS', 0x283), 'AC_CLEAR_ALARM' ), + ( ('CONS', 0x284), 'AC_SNOOZE_ALARM' ), + ( ('CONS', 0x285), 'AC_RESET_ALARM' ), + ( ('CONS', 0x286), 'AC_SYNCHRONIZE' ), + ( ('CONS', 0x287), 'AC_SEND_RECEIVE' ), + ( ('CONS', 0x288), 'AC_SEND_TO' ), + ( ('CONS', 0x289), 'AC_REPLY' ), + ( ('CONS', 0x28A), 'AC_REPLY_ALL' ), + ( ('CONS', 0x28B), 'AC_FORWARD_MSG' ), + ( ('CONS', 0x28C), 'AC_SEND' ), + ( ('CONS', 0x28D), 'AC_ATTACH_FILE' ), + ( ('CONS', 0x28E), 'AC_UPLOAD' ), + ( ('CONS', 0x28F), 'AC_DOWNLOAD' ), + ( ('CONS', 0x290), 'AC_SET_BORDERS' ), + ( ('CONS', 0x291), 'AC_INSERT_ROW' ), + ( ('CONS', 0x292), 'AC_INSERT_COLUMN' ), + ( ('CONS', 0x293), 'AC_INSERT_FILE' ), + ( ('CONS', 0x294), 'AC_INSERT_PICTURE' ), + ( ('CONS', 0x295), 'AC_INSERT_OBJECT' ), + ( ('CONS', 0x296), 'AC_INSERT_SYMBOL' ), + ( ('CONS', 0x297), 'AC_SAVE_AND_CLOSE' ), + ( ('CONS', 0x298), 'AC_RENAME' ), + ( ('CONS', 0x299), 'AC_MERGE' ), + ( ('CONS', 0x29A), 'AC_SPLIT' ), + ( ('CONS', 0x29B), 'AC_DISTRIBUTE_HORIZONTALLY' ), + ( ('CONS', 0x29C), 'AC_DISTRIBUTE_VERTICALLY' ), +# 0x29D-0xFFFF Reserved + + # USB HID LED Codes + ( ('LED', 0x00), 'LED_UNDEFINED' ), + ( ('LED', 0x01), 'LED_NUM_LOCK' ), + ( ('LED', 0x02), 'LED_CAPS_LOCK' ), + ( ('LED', 0x03), 'LED_SCROLL_LOCK' ), + ( ('LED', 0x04), 'LED_COMPOSE' ), + ( ('LED', 0x05), 'LED_KANA' ), + ( ('LED', 0x06), 'LED_POWER' ), + ( ('LED', 0x07), 'LED_SHIFT' ), + ( ('LED', 0x08), 'LED_DO_NOT_DISTURB' ), + ( ('LED', 0x09), 'LED_MUTE' ), + ( ('LED', 0x0A), 'LED_TONE_ENABLE' ), + ( ('LED', 0x0B), 'LED_HIGHCUT_FILTER' ), + ( ('LED', 0x0C), 'LED_LOWCUT_FILTER' ), + ( ('LED', 0x0D), 'LED_EQL_ENABLE' ), + ( ('LED', 0x0E), 'LED_SND_FLD_ON' ), + ( ('LED', 0x0F), 'LED_SURROUND_ON' ), + ( ('LED', 0x10), 'LED_REPEAT' ), + ( ('LED', 0x11), 'LED_STEREO' ), + ( ('LED', 0x12), 'LED_SAMPLE_RT_DET' ), + ( ('LED', 0x13), 'LED_SPINNING' ), + ( ('LED', 0x14), 'LED_CAV' ), + ( ('LED', 0x15), 'LED_CLV' ), + ( ('LED', 0x16), 'LED_REC_FMT_DET' ), + ( ('LED', 0x17), 'LED_OFF_HOOK' ), + ( ('LED', 0x18), 'LED_RING' ), + ( ('LED', 0x19), 'LED_MSG_WAITING' ), + ( ('LED', 0x1A), 'LED_DATA_MODE' ), + ( ('LED', 0x1B), 'LED_BAT_OPERATION' ), + ( ('LED', 0x1C), 'LED_BAT_OK' ), + ( ('LED', 0x1D), 'LED_BAT_LOW' ), + ( ('LED', 0x1E), 'LED_SPEAKER' ), + ( ('LED', 0x1F), 'LED_HEAD_SET' ), + ( ('LED', 0x20), 'LED_HOLD' ), + ( ('LED', 0x21), 'LED_MICROPHONE' ), + ( ('LED', 0x22), 'LED_COVERAGE' ), + ( ('LED', 0x23), 'LED_NIGHT_MODE' ), + ( ('LED', 0x24), 'LED_SEND_CALLS' ), + ( ('LED', 0x25), 'LED_CALL_PICKUP' ), + ( ('LED', 0x26), 'LED_CONFERENCE' ), + ( ('LED', 0x27), 'LED_STAND_BY' ), + ( ('LED', 0x28), 'LED_CAMERA_ON' ), + ( ('LED', 0x29), 'LED_CAMERA_OFF' ), + ( ('LED', 0x2A), 'LED_ON_LINE' ), + ( ('LED', 0x2B), 'LED_OFF_LINE' ), + ( ('LED', 0x2C), 'LED_BUSY' ), + ( ('LED', 0x2D), 'LED_READY' ), + ( ('LED', 0x2E), 'LED_PAPER_OUT' ), + ( ('LED', 0x2F), 'LED_PAPER_JAM' ), + ( ('LED', 0x30), 'LED_REMOTE' ), + ( ('LED', 0x31), 'LED_FORWARD' ), + ( ('LED', 0x32), 'LED_REVERSE' ), + ( ('LED', 0x33), 'LED_STOP' ), + ( ('LED', 0x34), 'LED_REWIND' ), + ( ('LED', 0x35), 'LED_FAST_FORWARD' ), + ( ('LED', 0x36), 'LED_PLAY' ), + ( ('LED', 0x37), 'LED_PAUSE' ), + ( ('LED', 0x38), 'LED_RECORD' ), + ( ('LED', 0x39), 'LED_ERROR' ), + ( ('LED', 0x3A), 'LED_USI' ), + ( ('LED', 0x3B), 'LED_UIUI' ), + ( ('LED', 0x3C), 'LED_UMMI' ), + ( ('LED', 0x3D), 'LED_IND_ON' ), + ( ('LED', 0x3E), 'LED_IND_FLASH' ), + ( ('LED', 0x3F), 'LED_IND_SLOW_BLNK' ), + ( ('LED', 0x40), 'LED_IND_FAST_BLNK' ), + ( ('LED', 0x41), 'LED_IND_OFF' ), + ( ('LED', 0x42), 'LED_FLASH_ON_TIME' ), + ( ('LED', 0x43), 'LED_SLW_B_ON_TIME' ), + ( ('LED', 0x44), 'LED_SLW_B_OFF_TIME' ), + ( ('LED', 0x45), 'LED_FST_B_ON_TIME' ), + ( ('LED', 0x46), 'LED_FST_B_OFF_TIME' ), + ( ('LED', 0x47), 'LED_UIC' ), + ( ('LED', 0x48), 'LED_IND_RED' ), + ( ('LED', 0x49), 'LED_IND_GREEN' ), + ( ('LED', 0x4A), 'LED_IND_AMBER' ), + ( ('LED', 0x4B), 'LED_GENERIC_IND' ), + ( ('LED', 0x4C), 'LED_SYS_SUSPEND' ), + ( ('LED', 0x4D), 'LED_EXT_PWR_CONN' ), +# 0x4E - 0xFFFF Reserved + + # USB HID System Control Codes +# List of System Controls - USB HID 1.12v2 pg 32 +# NKRO HID Supports 0x81 - 0xB7 + ( ('SYS', 0x81), 'SYS_POWER_DOWN' ), + ( ('SYS', 0x82), 'SYS_SLEEP' ), + ( ('SYS', 0x83), 'SYS_WAKE_UP' ), + ( ('SYS', 0x84), 'SYS_CONTEXT_MENU' ), + ( ('SYS', 0x85), 'SYS_MAIN_MENU' ), + ( ('SYS', 0x86), 'SYS_APP_MENU' ), + ( ('SYS', 0x87), 'SYS_MENU_HELP' ), + ( ('SYS', 0x88), 'SYS_MENU_EXIT' ), + ( ('SYS', 0x89), 'SYS_MENU_SELECT' ), + ( ('SYS', 0x8A), 'SYS_MENU_RIGHT' ), + ( ('SYS', 0x8B), 'SYS_MENU_LEFT' ), + ( ('SYS', 0x8C), 'SYS_MENU_UP' ), + ( ('SYS', 0x8D), 'SYS_MENU_DOWN' ), + ( ('SYS', 0x8E), 'SYS_COLD_RESTART' ), + ( ('SYS', 0x8F), 'SYS_WARM_RESTART' ), + ( ('SYS', 0x90), 'SYS_DPAD_UP' ), + ( ('SYS', 0x91), 'SYS_DPAD_DOWN' ), + ( ('SYS', 0x92), 'SYS_DPAD_RIGHT' ), + ( ('SYS', 0x93), 'SYS_DPAD_LEFT' ), +# 0x94 - 0x9F Reserved + ( ('SYS', 0xA0), 'SYS_DOCK' ), + ( ('SYS', 0xA1), 'SYS_UNDOCK' ), + ( ('SYS', 0xA2), 'SYS_SETUP' ), + ( ('SYS', 0xA3), 'SYS_BREAK' ), + ( ('SYS', 0xA4), 'SYS_DEBUGGER_BREAK' ), + ( ('SYS', 0xA5), 'SYS_APP_BREAK' ), + ( ('SYS', 0xA6), 'SYS_APP_DEBUGGER_BREAK' ), + ( ('SYS', 0xA7), 'SYS_SPEAKER_MUTE' ), + ( ('SYS', 0xA8), 'SYS_HIBERNATE' ), +# 0xA9 - 0xAF Reserved + ( ('SYS', 0xB0), 'SYS_DISP_INVERT' ), + ( ('SYS', 0xB1), 'SYS_DISP_INTERNAL' ), + ( ('SYS', 0xB2), 'SYS_DISP_EXTERNAL' ), + ( ('SYS', 0xB3), 'SYS_DISP_BOTH' ), + ( ('SYS', 0xB4), 'SYS_DISP_DUAL' ), + ( ('SYS', 0xB5), 'SYS_DISP_TOGGLE_INT_EXT' ), + ( ('SYS', 0xB6), 'SYS_DISP_SWAP_PRI_SEC' ), + ( ('SYS', 0xB7), 'SYS_DISP_LCD_AUTOSCALE' ), +# 0xB8 - 0xFFFF Reserved ]) # Lookup for KLL defined HID values, internally the compiler uses numbers to combine the keymaps -kll_hid_lookup_dictionary = dict([ - ( 'A', 0x04 ), - ( 'B', 0x05 ), - ( 'C', 0x06 ), - ( 'D', 0x07 ), - ( 'E', 0x08 ), - ( 'F', 0x09 ), - ( 'G', 0x0A ), - ( 'H', 0x0B ), - ( 'I', 0x0C ), - ( 'J', 0x0D ), - ( 'K', 0x0E ), - ( 'L', 0x0F ), - ( 'M', 0x10 ), - ( 'N', 0x11 ), - ( 'O', 0x12 ), - ( 'P', 0x13 ), - ( 'Q', 0x14 ), - ( 'R', 0x15 ), - ( 'S', 0x16 ), - ( 'T', 0x17 ), - ( 'U', 0x18 ), - ( 'V', 0x19 ), - ( 'W', 0x1A ), - ( 'X', 0x1B ), - ( 'Y', 0x1C ), - ( 'Z', 0x1D ), - ( '1', 0x1E ), - ( '2', 0x1F ), - ( '3', 0x20 ), - ( '4', 0x21 ), - ( '5', 0x22 ), - ( '6', 0x23 ), - ( '7', 0x24 ), - ( '8', 0x25 ), - ( '9', 0x26 ), - ( '0', 0x27 ), - ( 'ENTER', 0x28 ), - ( 'ESC', 0x29 ), ( 'ESCAPE', 0x29 ), - ( 'BACKSPACE', 0x2A ), - ( 'TAB', 0x2B ), - ( 'SPACE', 0x2C ), ( 'SPACEBAR', 0x2C ), - ( '-', 0x2D ), ( 'MINUS', 0x2D ), - ( '=', 0x2E ), ( 'EQUALS', 0x2E ), ( 'EQUAL', 0x2E ), - ( '{', 0x2F ), ( 'LEFT BRACE', 0x2F ), ( 'LBRACE', 0x2F ), - ( '}', 0x30 ), ( 'RIGHT BRACE', 0x30 ), ( 'RBRACE', 0x30 ), - ( '\\', 0x31 ), ( 'BACKSLASH', 0x31 ), - ( '#', 0x32 ), ( 'NUMBER', 0x32 ), ( 'HASH', 0x32 ), - ( ';', 0x33 ), ( 'SEMICOLON', 0x33 ), - ( "'", 0x34 ), ( 'QUOTE', 0x34 ), ( 'SINGLE QUOTE', 0x34 ), - ( '`', 0x35 ), ( 'BACKTICK', 0x35 ), - ( ',', 0x36 ), ( 'COMMA', 0x36 ), - ( '.', 0x37 ), ( 'PERIOD', 0x37 ), - ( '/', 0x38 ), ( 'SLASH', 0x38 ), - ( 'CAPSLOCK', 0x39 ), { 'CAPS LOCK', 0x39 }, - ( 'F1', 0x3A ), - ( 'F2', 0x3B ), - ( 'F3', 0x3C ), - ( 'F4', 0x3D ), - ( 'F5', 0x3E ), - ( 'F6', 0x3F ), - ( 'F7', 0x40 ), - ( 'F8', 0x41 ), - ( 'F9', 0x42 ), - ( 'F10', 0x43 ), - ( 'F11', 0x44 ), - ( 'F12', 0x45 ), - ( 'PRINTSCREEN', 0x46 ), ( 'PRINT SCREEN', 0x46 ), - ( 'SCROLLLOCK', 0x47 ), ( 'SCROLL LOCK', 0x47 ), - ( 'PAUSE', 0x48 ), - ( 'INSERT', 0x49 ), - ( 'HOME', 0x4A ), - ( 'PAGEUP', 0x4B ), ( 'PAGE UP', 0x4B ), - ( 'DELETE', 0x4C ), - ( 'END', 0x4D ), - ( 'PAGEDOWN', 0x4E ), ( 'PAGE DOWN', 0x4E ), - ( 'RIGHT', 0x4F ), - ( 'LEFT', 0x50 ), - ( 'DOWN', 0x51 ), - ( 'UP', 0x52 ), - ( 'NUMLOCK', 0x53 ), ( 'NUM LOCK', 0x53 ), - ( 'P/', 0x54 ), ( 'KEYPAD SLASH', 0x54 ), - ( 'P*', 0x55 ), ( 'KEYPAD ASTERIX', 0x55 ), ( 'KEYPAD ASTERISK', 0x55 ), - ( 'P-', 0x56 ), ( 'KEYPAD MINUS', 0x56 ), - ( 'P+', 0x57 ), ( 'KEYPAD PLUS', 0x57 ), - ( 'PENTER', 0x58 ), ( 'KEYPAD ENTER', 0x58 ), - ( 'P1', 0x59 ), ( 'KEYPAD 1', 0x59 ), - ( 'P2', 0x5A ), ( 'KEYPAD 2', 0x5A ), - ( 'P3', 0x5B ), ( 'KEYPAD 3', 0x5B ), - ( 'P4', 0x5C ), ( 'KEYPAD 4', 0x5C ), - ( 'P5', 0x5D ), ( 'KEYPAD 5', 0x5D ), - ( 'P6', 0x5E ), ( 'KEYPAD 6', 0x5E ), - ( 'P7', 0x5F ), ( 'KEYPAD 7', 0x5F ), - ( 'P8', 0x60 ), ( 'KEYPAD 8', 0x60 ), - ( 'P9', 0x61 ), ( 'KEYPAD 9', 0x61 ), - ( 'P0', 0x62 ), ( 'KEYPAD 0', 0x62 ), - ( 'P.', 0x63 ), ( 'KEYPAD PERIOD', 0x63 ), - ( 'ISO/', 0x64 ), ( 'ISO SLASH', 0x64 ), - ( 'APP', 0x65 ), +kll_hid_lookup_dictionary = dict() +kll_hid_lookup_dictionary['USBCode'] = dict([ + # USB HID Keyboard Codes + ( 'A', ('USB', 0x04) ), + ( 'B', ('USB', 0x05) ), + ( 'C', ('USB', 0x06) ), + ( 'D', ('USB', 0x07) ), + ( 'E', ('USB', 0x08) ), + ( 'F', ('USB', 0x09) ), + ( 'G', ('USB', 0x0A) ), + ( 'H', ('USB', 0x0B) ), + ( 'I', ('USB', 0x0C) ), + ( 'J', ('USB', 0x0D) ), + ( 'K', ('USB', 0x0E) ), + ( 'L', ('USB', 0x0F) ), + ( 'M', ('USB', 0x10) ), + ( 'N', ('USB', 0x11) ), + ( 'O', ('USB', 0x12) ), + ( 'P', ('USB', 0x13) ), + ( 'Q', ('USB', 0x14) ), + ( 'R', ('USB', 0x15) ), + ( 'S', ('USB', 0x16) ), + ( 'T', ('USB', 0x17) ), + ( 'U', ('USB', 0x18) ), + ( 'V', ('USB', 0x19) ), + ( 'W', ('USB', 0x1A) ), + ( 'X', ('USB', 0x1B) ), + ( 'Y', ('USB', 0x1C) ), + ( 'Z', ('USB', 0x1D) ), + ( '1', ('USB', 0x1E) ), + ( '2', ('USB', 0x1F) ), + ( '3', ('USB', 0x20) ), + ( '4', ('USB', 0x21) ), + ( '5', ('USB', 0x22) ), + ( '6', ('USB', 0x23) ), + ( '7', ('USB', 0x24) ), + ( '8', ('USB', 0x25) ), + ( '9', ('USB', 0x26) ), + ( '0', ('USB', 0x27) ), + ( 'ENTER', ('USB', 0x28) ), + ( 'ESC', ('USB', 0x29) ), ( 'ESCAPE', ('USB', 0x29) ), + ( 'BACKSPACE', ('USB', 0x2A) ), + ( 'TAB', ('USB', 0x2B) ), + ( 'SPACE', ('USB', 0x2C) ), ( 'SPACEBAR', ('USB', 0x2C) ), + ( '-', ('USB', 0x2D) ), ( 'MINUS', ('USB', 0x2D) ), + ( '=', ('USB', 0x2E) ), ( 'EQUALS', ('USB', 0x2E) ), ( 'EQUAL', ('USB', 0x2E) ), + ( '{', ('USB', 0x2F) ), ( 'LEFT BRACE', ('USB', 0x2F) ), ( 'LBRACE', ('USB', 0x2F) ), + ( '}', ('USB', 0x30) ), ( 'RIGHT BRACE', ('USB', 0x30) ), ( 'RBRACE', ('USB', 0x30) ), + ( '\\', ('USB', 0x31) ), ( 'BACKSLASH', ('USB', 0x31) ), + ( '#', ('USB', 0x32) ), ( 'NUMBER', ('USB', 0x32) ), ( 'HASH', ('USB', 0x32) ), + ( ';', ('USB', 0x33) ), ( 'SEMICOLON', ('USB', 0x33) ), + ( "'", ('USB', 0x34) ), ( 'QUOTE', ('USB', 0x34) ), ( 'SINGLE QUOTE', ('USB', 0x34) ), + ( '`', ('USB', 0x35) ), ( 'BACKTICK', ('USB', 0x35) ), + ( ',', ('USB', 0x36) ), ( 'COMMA', ('USB', 0x36) ), + ( '.', ('USB', 0x37) ), ( 'PERIOD', ('USB', 0x37) ), + ( '/', ('USB', 0x38) ), ( 'SLASH', ('USB', 0x38) ), + ( 'CAPSLOCK', ('USB', 0x39) ), { 'CAPS LOCK', ('USB', 0x39) }, + ( 'F1', ('USB', 0x3A) ), + ( 'F2', ('USB', 0x3B) ), + ( 'F3', ('USB', 0x3C) ), + ( 'F4', ('USB', 0x3D) ), + ( 'F5', ('USB', 0x3E) ), + ( 'F6', ('USB', 0x3F) ), + ( 'F7', ('USB', 0x40) ), + ( 'F8', ('USB', 0x41) ), + ( 'F9', ('USB', 0x42) ), + ( 'F10', ('USB', 0x43) ), + ( 'F11', ('USB', 0x44) ), + ( 'F12', ('USB', 0x45) ), + ( 'PRINTSCREEN', ('USB', 0x46) ), ( 'PRINT SCREEN', ('USB', 0x46) ), + ( 'SCROLLLOCK', ('USB', 0x47) ), ( 'SCROLL LOCK', ('USB', 0x47) ), + ( 'PAUSE', ('USB', 0x48) ), + ( 'INSERT', ('USB', 0x49) ), + ( 'HOME', ('USB', 0x4A) ), + ( 'PAGEUP', ('USB', 0x4B) ), ( 'PAGE UP', ('USB', 0x4B) ), + ( 'DELETE', ('USB', 0x4C) ), + ( 'END', ('USB', 0x4D) ), + ( 'PAGEDOWN', ('USB', 0x4E) ), ( 'PAGE DOWN', ('USB', 0x4E) ), + ( 'RIGHT', ('USB', 0x4F) ), + ( 'LEFT', ('USB', 0x50) ), + ( 'DOWN', ('USB', 0x51) ), + ( 'UP', ('USB', 0x52) ), + ( 'NUMLOCK', ('USB', 0x53) ), ( 'NUM LOCK', ('USB', 0x53) ), + ( 'P/', ('USB', 0x54) ), ( 'KEYPAD SLASH', ('USB', 0x54) ), + ( 'P*', ('USB', 0x55) ), ( 'KEYPAD ASTERIX', ('USB', 0x55) ), ( 'KEYPAD ASTERISK', ('USB', 0x55) ), + ( 'P-', ('USB', 0x56) ), ( 'KEYPAD MINUS', ('USB', 0x56) ), + ( 'P+', ('USB', 0x57) ), ( 'KEYPAD PLUS', ('USB', 0x57) ), + ( 'PENTER', ('USB', 0x58) ), ( 'KEYPAD ENTER', ('USB', 0x58) ), + ( 'P1', ('USB', 0x59) ), ( 'KEYPAD 1', ('USB', 0x59) ), + ( 'P2', ('USB', 0x5A) ), ( 'KEYPAD 2', ('USB', 0x5A) ), + ( 'P3', ('USB', 0x5B) ), ( 'KEYPAD 3', ('USB', 0x5B) ), + ( 'P4', ('USB', 0x5C) ), ( 'KEYPAD 4', ('USB', 0x5C) ), + ( 'P5', ('USB', 0x5D) ), ( 'KEYPAD 5', ('USB', 0x5D) ), + ( 'P6', ('USB', 0x5E) ), ( 'KEYPAD 6', ('USB', 0x5E) ), + ( 'P7', ('USB', 0x5F) ), ( 'KEYPAD 7', ('USB', 0x5F) ), + ( 'P8', ('USB', 0x60) ), ( 'KEYPAD 8', ('USB', 0x60) ), + ( 'P9', ('USB', 0x61) ), ( 'KEYPAD 9', ('USB', 0x61) ), + ( 'P0', ('USB', 0x62) ), ( 'KEYPAD 0', ('USB', 0x62) ), + ( 'P.', ('USB', 0x63) ), ( 'KEYPAD PERIOD', ('USB', 0x63) ), + ( 'ISO/', ('USB', 0x64) ), ( 'ISO SLASH', ('USB', 0x64) ), + ( 'APP', ('USB', 0x65) ), - ( 'P=', 0x67 ), ( 'KEYPAD EQUAL', 0x67 ), - ( 'F13', 0x68 ), - ( 'F14', 0x69 ), - ( 'F15', 0x6A ), - ( 'F16', 0x6B ), - ( 'F17', 0x6C ), - ( 'F18', 0x6D ), - ( 'F19', 0x6E ), - ( 'F20', 0x6F ), - ( 'F21', 0x70 ), - ( 'F22', 0x71 ), - ( 'F23', 0x72 ), - ( 'F24', 0x73 ), - ( 'EXEC', 0x74 ), - ( 'HELP', 0x75 ), - ( 'MENU', 0x76 ), - ( 'SELECT', 0x77 ), - ( 'STOP', 0x78 ), - ( 'AGAIN', 0x79 ), - ( 'UNDO', 0x7A ), - ( 'CUT', 0x7B ), - ( 'COPY', 0x7C ), - ( 'PASTE', 0x7D ), - ( 'FIND', 0x7E ), - ( 'MUTE', 0x7F ), - ( 'VOLUMEUP', 0x80 ), ( 'VOLUME UP', 0x80 ), - ( 'VOLUMEDOWN', 0x81 ), ( 'VOLUME DOWN', 0x81 ), - ( 'CAPSTOGGLELOCK', 0x82 ), ( 'CAPS TOGGLE LOCK', 0x82 ), - ( 'NUMTOGGLELOCK', 0x83 ), ( 'NUM TOGGLE LOCK', 0x83 ), - ( 'SCROLLTOGGLELOCK', 0x84 ), ( 'SCROLL TOGGLE LOCK', 0x84 ), - ( 'P,', 0x85 ), - ( 'KEYPAD AS400 EQUAL', 0x86 ), - ( 'INTER1', 0x87 ), ( 'KANJI1', 0x87 ), - ( 'INTER2', 0x88 ), ( 'KANJI2', 0x88 ), ( 'KANA', 0x88 ), - ( 'INTER3', 0x89 ), ( 'KANJI3', 0x89 ), ( 'YEN', 0x89 ), - ( 'INTER4', 0x8A ), ( 'KANJI4', 0x8A ), ( 'HENKAN', 0x8A ), - ( 'INTER5', 0x8B ), ( 'KANJI5', 0x8B ), ( 'MUHENKAN', 0x8B ), - ( 'INTER6', 0x8C ), ( 'KANJI6', 0x8C ), - ( 'INTER7', 0x8D ), ( 'KANJI7', 0x8D ), ( 'BYTETOGGLE', 0x8D ), ( 'BYTE TOGGLE', 0x8D ), - ( 'INTER8', 0x8E ), ( 'KANJI8', 0x8E ), - ( 'INTER9', 0x8F ), ( 'KANJI9', 0x8F ), - ( 'LANG1', 0x90 ), ( 'HANGULENGLISH', 0x90 ), ( 'HANGUL ENGLISH', 0x90 ), - ( 'LANG2', 0x91 ), ( 'HANJA', 0x91 ), ( 'EISU', 0x91 ), - ( 'LANG3', 0x92 ), ( 'KATAKANA', 0x92 ), - ( 'LANG4', 0x93 ), ( 'HIRAGANA', 0x93 ), - ( 'LANG5', 0x94 ), ( 'ZENKAKUHANKAKU', 0x94 ), ( 'ZENKAKU HANKAKU', 0x94 ), - ( 'LANG6', 0x95 ), - ( 'LANG7', 0x96 ), - ( 'LANG8', 0x97 ), - ( 'LANG9', 0x98 ), - ( 'ALTERASE', 0x99 ), ( 'ALT ERASE', 0x99 ), - ( 'SYSREQATT', 0x9A ), ( 'SYSREQ', 0x9A ), ( 'SYSTEM REQUEST', 0x9A ), - ( 'CANCEL', 0x9B ), - ( 'CLEAR', 0x9C ), - ( 'PRIOR', 0x9D ), - ( 'RETURN', 0x9E ), - ( 'SEP', 0x9F ), ( 'SEPARATOR', 0x9F ), - ( 'OUT', 0xA0 ), - ( 'OPER', 0xA1 ), - ( 'CLEAR AGAIN', 0xA2 ), - ( 'CRSEL PROPS', 0xA3 ), - ( 'EXSEL', 0xA4 ), + ( 'P=', ('USB', 0x67) ), ( 'KEYPAD EQUAL', ('USB', 0x67) ), + ( 'F13', ('USB', 0x68) ), + ( 'F14', ('USB', 0x69) ), + ( 'F15', ('USB', 0x6A) ), + ( 'F16', ('USB', 0x6B) ), + ( 'F17', ('USB', 0x6C) ), + ( 'F18', ('USB', 0x6D) ), + ( 'F19', ('USB', 0x6E) ), + ( 'F20', ('USB', 0x6F) ), + ( 'F21', ('USB', 0x70) ), + ( 'F22', ('USB', 0x71) ), + ( 'F23', ('USB', 0x72) ), + ( 'F24', ('USB', 0x73) ), + ( 'EXEC', ('USB', 0x74) ), + ( 'HELP', ('USB', 0x75) ), + ( 'MENU', ('USB', 0x76) ), + ( 'SELECT', ('USB', 0x77) ), + ( 'STOP', ('USB', 0x78) ), + ( 'AGAIN', ('USB', 0x79) ), + ( 'UNDO', ('USB', 0x7A) ), + ( 'CUT', ('USB', 0x7B) ), + ( 'COPY', ('USB', 0x7C) ), + ( 'PASTE', ('USB', 0x7D) ), + ( 'FIND', ('USB', 0x7E) ), + ( 'MUTE', ('USB', 0x7F) ), + ( 'VOLUMEUP', ('USB', 0x80) ), ( 'VOLUME UP', ('USB', 0x80) ), + ( 'VOLUMEDOWN', ('USB', 0x81) ), ( 'VOLUME DOWN', ('USB', 0x81) ), + ( 'CAPSTOGGLELOCK', ('USB', 0x82) ), ( 'CAPS TOGGLE LOCK', ('USB', 0x82) ), + ( 'NUMTOGGLELOCK', ('USB', 0x83) ), ( 'NUM TOGGLE LOCK', ('USB', 0x83) ), + ( 'SCROLLTOGGLELOCK', ('USB', 0x84) ), ( 'SCROLL TOGGLE LOCK', ('USB', 0x84) ), + ( 'P,', ('USB', 0x85) ), + ( 'KEYPAD AS400 EQUAL', ('USB', 0x86) ), + ( 'INTER1', ('USB', 0x87) ), ( 'KANJI1', ('USB', 0x87) ), + ( 'INTER2', ('USB', 0x88) ), ( 'KANJI2', ('USB', 0x88) ), ( 'KANA', ('USB', 0x88) ), + ( 'INTER3', ('USB', 0x89) ), ( 'KANJI3', ('USB', 0x89) ), ( 'YEN', ('USB', 0x89) ), + ( 'INTER4', ('USB', 0x8A) ), ( 'KANJI4', ('USB', 0x8A) ), ( 'HENKAN', ('USB', 0x8A) ), + ( 'INTER5', ('USB', 0x8B) ), ( 'KANJI5', ('USB', 0x8B) ), ( 'MUHENKAN', ('USB', 0x8B) ), + ( 'INTER6', ('USB', 0x8C) ), ( 'KANJI6', ('USB', 0x8C) ), + ( 'INTER7', ('USB', 0x8D) ), ( 'KANJI7', ('USB', 0x8D) ), ( 'BYTETOGGLE', ('USB', 0x8D) ), ( 'BYTE TOGGLE', ('USB', 0x8D) ), + ( 'INTER8', ('USB', 0x8E) ), ( 'KANJI8', ('USB', 0x8E) ), + ( 'INTER9', ('USB', 0x8F) ), ( 'KANJI9', ('USB', 0x8F) ), + ( 'LANG1', ('USB', 0x90) ), ( 'HANGULENGLISH', ('USB', 0x90) ), ( 'HANGUL ENGLISH', ('USB', 0x90) ), + ( 'LANG2', ('USB', 0x91) ), ( 'HANJA', ('USB', 0x91) ), ( 'EISU', ('USB', 0x91) ), + ( 'LANG3', ('USB', 0x92) ), ( 'KATAKANA', ('USB', 0x92) ), + ( 'LANG4', ('USB', 0x93) ), ( 'HIRAGANA', ('USB', 0x93) ), + ( 'LANG5', ('USB', 0x94) ), ( 'ZENKAKUHANKAKU', ('USB', 0x94) ), ( 'ZENKAKU HANKAKU', ('USB', 0x94) ), + ( 'LANG6', ('USB', 0x95) ), + ( 'LANG7', ('USB', 0x96) ), + ( 'LANG8', ('USB', 0x97) ), + ( 'LANG9', ('USB', 0x98) ), + ( 'ALTERASE', ('USB', 0x99) ), ( 'ALT ERASE', ('USB', 0x99) ), + ( 'SYSREQATT', ('USB', 0x9A) ), ( 'SYSREQ', ('USB', 0x9A) ), ( 'SYSTEM REQUEST', ('USB', 0x9A) ), + ( 'CANCEL', ('USB', 0x9B) ), + ( 'CLEAR', ('USB', 0x9C) ), + ( 'PRIOR', ('USB', 0x9D) ), + ( 'RETURN', ('USB', 0x9E) ), + ( 'SEP', ('USB', 0x9F) ), ( 'SEPARATOR', ('USB', 0x9F) ), + ( 'OUT', ('USB', 0xA0) ), + ( 'OPER', ('USB', 0xA1) ), + ( 'CLEAR AGAIN', ('USB', 0xA2) ), + ( 'CRSEL PROPS', ('USB', 0xA3) ), + ( 'EXSEL', ('USB', 0xA4) ), - ( 'P00', 0xB0 ), ( 'KEYPAD 00', 0xB0 ), - ( 'P000', 0xB1 ), ( 'KEYPAD 000', 0xB1 ), - ( '1000SEP', 0xB2 ), ( 'THOUSANDSEPARATOR', 0xB2 ), ( 'THOUSAND SEPARATOR', 0xB2 ), - ( 'DECIMALSEP', 0xB3 ), ( 'DECIMALSEPARATOR', 0xB3 ), ( 'DECIMAL SEPARATOR', 0xB3 ), - ( 'CURRENCY', 0xB4 ), ( 'CURRENCYUNIT', 0xB4 ), ( 'CURRENCY UNIT', 0xB4 ), - ( 'CURRENCYSUB', 0xB5 ), ( 'CURRENCYSUBUNIT', 0xB5 ), ( 'CURRENCY SUB UNIT', 0xB5 ), - ( 'P(', 0xB6 ), ( 'KEYPAD LEFT PARENTHESES', 0xB6 ), - ( 'P)', 0xB7 ), ( 'KEYPAD RIGHT PARENTHESES', 0xB7 ), - ( 'P{', 0xB8 ), ( 'KEYPAD LEFT BRACE', 0xB8 ), - ( 'P}', 0xB9 ), ( 'KEYPAD RIGHT BRACE', 0xB9 ), - ( 'PTAB', 0xBA ), ( 'KEYPAD TAB', 0xBA ), - ( 'PBACKSPACE', 0xBB ), ( 'KEYPAD BACKSPACE', 0xBB ), - ( 'PA', 0xBC ), ( 'KEYPAD A', 0xBC ), - ( 'PB', 0xBD ), ( 'KEYPAD B', 0xBD ), - ( 'PC', 0xBE ), ( 'KEYPAD C', 0xBE ), - ( 'PD', 0xBF ), ( 'KEYPAD D', 0xBF ), - ( 'PE', 0xC0 ), ( 'KEYPAD E', 0xC0 ), - ( 'PF', 0xC1 ), ( 'KEYPAD F', 0xC1 ), - ( 'PXOR', 0xC2 ), ( 'KEYPAD XOR', 0xC2 ), - ( 'P^', 0xC3 ), ( 'KEYPAD CHEVRON', 0xC3 ), - ( 'P%', 0xC4 ), ( 'KEYPAD PERCENT', 0xC4 ), - ( 'P<', 0xC5 ), ( 'KEYPAD LESSTHAN', 0xC5 ), ( 'KEYPAD LESS THAN', 0xC5 ), - ( 'P>', 0xC6 ), ( 'KEYPAD GREATERTHAN', 0xC6 ), ( 'KEYPAD GREATER THAN', 0xC6 ), - ( 'P&', 0xC7 ), ( 'KEYPAD BITAND', 0xC7 ), ( 'KEYPAD BIT AND', 0xC7 ), - ( 'P&&', 0xC8 ), ( 'KEYPAD AND', 0xC8 ), - ( 'P|', 0xC9 ), ( 'KEYPAD BITOR', 0xC9 ), ( 'KEYPAD BIT OR', 0xC9 ), - ( 'P||', 0xCA ), ( 'KEYPAD OR', 0xCA ), - ( 'P:', 0xCB ), ( 'KEYPAD COLON', 0xCB ), - ( 'P#', 0xCC ), ( 'KEYPAD NUMBER', 0xCC ), ( 'KEYPAD HASH', 0xCC ), - ( 'PSPACE', 0xCD ), ( 'KEYPAD SPACE', 0xCD ), - ( 'P@', 0xCE ), ( 'KEYPAD AT', 0xCE ), - ( 'P!', 0xCF ), ( 'KEYPAD EXCLAIM', 0xCF ), - ( 'PMEMSTORE', 0xD0 ), ( 'KEYPAD MEMSTORE', 0xD0 ), ( 'KEYPAD MEMORY STORE', 0xD0 ), - ( 'PMEMRECALL', 0xD1 ), ( 'KEYPAD MEMRECALL', 0xD1 ), ( 'KEYPAD MEMORY RECALL', 0xD1 ), - ( 'PMEMCLEAR', 0xD2 ), ( 'KEYPAD MEMCLEAR', 0xD2 ), ( 'KEYPAD MEMORY CLEAR', 0xD2 ), - ( 'PMEMADD', 0xD3 ), ( 'KEYPAD MEMADD', 0xD3 ), ( 'KEYPAD MEMORY ADD', 0xD3 ), - ( 'PMEMSUB', 0xD4 ), ( 'KEYPAD MEMSUB', 0xD4 ), ( 'KEYPAD MEMORY SUB', 0xD4 ), - ( 'PMEMMULT', 0xD5 ), ( 'KEYPAD MEMMULT', 0xD5 ), ( 'KEYPAD MEMORY MULTIPLY', 0xD5 ), - ( 'PMEMDIV', 0xD6 ), ( 'KEYPAD MEMDIV', 0xD6 ), ( 'KEYPAD MEMORY DIVIDE', 0xD6 ), - ( 'P+/-', 0xD7 ), ( 'KEYPAD PLUSMINUS', 0xD7 ), ( 'KEYPAD PLUS MINUS', 0xD7 ), - ( 'PCLEAR', 0xD8 ), ( 'KEYPAD CLEAR', 0xD8 ), - ( 'PCLEARENTRY', 0xD9 ), ( 'KEYPAD CLEARENTRY', 0xD9 ), ( 'KEYPAD CLEAR ENTRY', 0xD9 ), - ( 'PBINARY', 0xDA ), ( 'KEYPAD BINARY', 0xDA ), - ( 'POCTAL', 0xDB ), ( 'KEYPAD OCTAL', 0xDB ), - ( 'PDECIMAL', 0xDC ), ( 'KEYPAD DECIMAL', 0xDC ), - ( 'PHEX', 0xDD ), ( 'KEYPAD HEX', 0xDD ), + ( 'P00', ('USB', 0xB0) ), ( 'KEYPAD 00', ('USB', 0xB0) ), + ( 'P000', ('USB', 0xB1) ), ( 'KEYPAD 000', ('USB', 0xB1) ), + ( '1000SEP', ('USB', 0xB2) ), ( 'THOUSANDSEPARATOR', ('USB', 0xB2) ), ( 'THOUSAND SEPARATOR', ('USB', 0xB2) ), + ( 'DECIMALSEP', ('USB', 0xB3) ), ( 'DECIMALSEPARATOR', ('USB', 0xB3) ), ( 'DECIMAL SEPARATOR', ('USB', 0xB3) ), + ( 'CURRENCY', ('USB', 0xB4) ), ( 'CURRENCYUNIT', ('USB', 0xB4) ), ( 'CURRENCY UNIT', ('USB', 0xB4) ), + ( 'CURRENCYSUB', ('USB', 0xB5) ), ( 'CURRENCYSUBUNIT', ('USB', 0xB5) ), ( 'CURRENCY SUB UNIT', ('USB', 0xB5) ), + ( 'P(', ('USB', 0xB6) ), ( 'KEYPAD LEFT PARENTHESES', ('USB', 0xB6) ), + ( 'P)', ('USB', 0xB7) ), ( 'KEYPAD RIGHT PARENTHESES', ('USB', 0xB7) ), + ( 'P{', ('USB', 0xB8) ), ( 'KEYPAD LEFT BRACE', ('USB', 0xB8) ), + ( 'P}', ('USB', 0xB9) ), ( 'KEYPAD RIGHT BRACE', ('USB', 0xB9) ), + ( 'PTAB', ('USB', 0xBA) ), ( 'KEYPAD TAB', ('USB', 0xBA) ), + ( 'PBACKSPACE', ('USB', 0xBB) ), ( 'KEYPAD BACKSPACE', ('USB', 0xBB) ), + ( 'PA', ('USB', 0xBC) ), ( 'KEYPAD A', ('USB', 0xBC) ), + ( 'PB', ('USB', 0xBD) ), ( 'KEYPAD B', ('USB', 0xBD) ), + ( 'PC', ('USB', 0xBE) ), ( 'KEYPAD C', ('USB', 0xBE) ), + ( 'PD', ('USB', 0xBF) ), ( 'KEYPAD D', ('USB', 0xBF) ), + ( 'PE', ('USB', 0xC0) ), ( 'KEYPAD E', ('USB', 0xC0) ), + ( 'PF', ('USB', 0xC1) ), ( 'KEYPAD F', ('USB', 0xC1) ), + ( 'PXOR', ('USB', 0xC2) ), ( 'KEYPAD XOR', ('USB', 0xC2) ), + ( 'P^', ('USB', 0xC3) ), ( 'KEYPAD CHEVRON', ('USB', 0xC3) ), + ( 'P%', ('USB', 0xC4) ), ( 'KEYPAD PERCENT', ('USB', 0xC4) ), + ( 'P<', ('USB', 0xC5) ), ( 'KEYPAD LESSTHAN', ('USB', 0xC5) ), ( 'KEYPAD LESS THAN', ('USB', 0xC5) ), + ( 'P>', ('USB', 0xC6) ), ( 'KEYPAD GREATERTHAN', ('USB', 0xC6) ), ( 'KEYPAD GREATER THAN', ('USB', 0xC6) ), + ( 'P&', ('USB', 0xC7) ), ( 'KEYPAD BITAND', ('USB', 0xC7) ), ( 'KEYPAD BIT AND', ('USB', 0xC7) ), + ( 'P&&', ('USB', 0xC8) ), ( 'KEYPAD AND', ('USB', 0xC8) ), + ( 'P|', ('USB', 0xC9) ), ( 'KEYPAD BITOR', ('USB', 0xC9) ), ( 'KEYPAD BIT OR', ('USB', 0xC9) ), + ( 'P||', ('USB', 0xCA) ), ( 'KEYPAD OR', ('USB', 0xCA) ), + ( 'P:', ('USB', 0xCB) ), ( 'KEYPAD COLON', ('USB', 0xCB) ), + ( 'P#', ('USB', 0xCC) ), ( 'KEYPAD NUMBER', ('USB', 0xCC) ), ( 'KEYPAD HASH', ('USB', 0xCC) ), + ( 'PSPACE', ('USB', 0xCD) ), ( 'KEYPAD SPACE', ('USB', 0xCD) ), + ( 'P@', ('USB', 0xCE) ), ( 'KEYPAD AT', ('USB', 0xCE) ), + ( 'P!', ('USB', 0xCF) ), ( 'KEYPAD EXCLAIM', ('USB', 0xCF) ), + ( 'PMEMSTORE', ('USB', 0xD0) ), ( 'KEYPAD MEMSTORE', ('USB', 0xD0) ), ( 'KEYPAD MEMORY STORE', ('USB', 0xD0) ), + ( 'PMEMRECALL', ('USB', 0xD1) ), ( 'KEYPAD MEMRECALL', ('USB', 0xD1) ), ( 'KEYPAD MEMORY RECALL', ('USB', 0xD1) ), + ( 'PMEMCLEAR', ('USB', 0xD2) ), ( 'KEYPAD MEMCLEAR', ('USB', 0xD2) ), ( 'KEYPAD MEMORY CLEAR', ('USB', 0xD2) ), + ( 'PMEMADD', ('USB', 0xD3) ), ( 'KEYPAD MEMADD', ('USB', 0xD3) ), ( 'KEYPAD MEMORY ADD', ('USB', 0xD3) ), + ( 'PMEMSUB', ('USB', 0xD4) ), ( 'KEYPAD MEMSUB', ('USB', 0xD4) ), ( 'KEYPAD MEMORY SUB', ('USB', 0xD4) ), + ( 'PMEMMULT', ('USB', 0xD5) ), ( 'KEYPAD MEMMULT', ('USB', 0xD5) ), ( 'KEYPAD MEMORY MULTIPLY', ('USB', 0xD5) ), + ( 'PMEMDIV', ('USB', 0xD6) ), ( 'KEYPAD MEMDIV', ('USB', 0xD6) ), ( 'KEYPAD MEMORY DIVIDE', ('USB', 0xD6) ), + ( 'P+/-', ('USB', 0xD7) ), ( 'KEYPAD PLUSMINUS', ('USB', 0xD7) ), ( 'KEYPAD PLUS MINUS', ('USB', 0xD7) ), + ( 'PCLEAR', ('USB', 0xD8) ), ( 'KEYPAD CLEAR', ('USB', 0xD8) ), + ( 'PCLEARENTRY', ('USB', 0xD9) ), ( 'KEYPAD CLEARENTRY', ('USB', 0xD9) ), ( 'KEYPAD CLEAR ENTRY', ('USB', 0xD9) ), + ( 'PBINARY', ('USB', 0xDA) ), ( 'KEYPAD BINARY', ('USB', 0xDA) ), + ( 'POCTAL', ('USB', 0xDB) ), ( 'KEYPAD OCTAL', ('USB', 0xDB) ), + ( 'PDECIMAL', ('USB', 0xDC) ), ( 'KEYPAD DECIMAL', ('USB', 0xDC) ), + ( 'PHEX', ('USB', 0xDD) ), ( 'KEYPAD HEX', ('USB', 0xDD) ), - ( 'LCTRL', 0xE0 ), ( 'LEFT CTRL', 0xE0 ), ( 'CTRL', 0xE0 ), ( 'CONTROL', 0xE0 ), ( 'LEFT CONTROL', 0xE0 ), - ( 'LSHIFT', 0xE1 ), ( 'LEFT SHIFT', 0xE1 ), ( 'SHIFT', 0xE1 ), - ( 'LALT', 0xE2 ), ( 'LEFT ALT', 0xE2 ), ( 'ALT', 0xE2 ), ( 'ALTERNATE', 0xE2 ), ( 'LEFT ALTERNATE', 0xE2 ), - ( 'LGUI', 0xE3 ), ( 'LEFT GUI', 0xE3 ), ( 'GUI', 0xE3 ), ( 'SUPER', 0xE3 ), ( 'LEFT SUPER', 0xE3 ), ( 'WINDOWS', 0xE3 ), ( 'LEFT WINDOWS', 0xE3 ), ( 'WIN', 0xE3 ), ( 'LEFT WIN', 0xE3 ), - ( 'RCTRL', 0xE4 ), ( 'RIGHT CTRL', 0xE4 ), ( 'RIGHT CONTROL', 0xE4 ), - ( 'RSHIFT', 0xE5 ), ( 'RIGHT SHIFT', 0xE5 ), - ( 'RALT', 0xE6 ), ( 'RIGHT ALT', 0xE6 ), ( 'RIGHT ALTERNATE', 0xE6 ), - ( 'RGUI', 0xE7 ), ( 'RIGHT GUI', 0xE7 ), ( 'RIGHT SUPER', 0xE7 ), ( 'RIGHT WINDOWS', 0xE7 ), ( 'RIGHT WIN', 0xE7 ), + ( 'LCTRL', ('USB', 0xE0) ), ( 'LEFT CTRL', ('USB', 0xE0) ), ( 'CTRL', ('USB', 0xE0) ), ( 'CONTROL', ('USB', 0xE0) ), ( 'LEFT CONTROL', ('USB', 0xE0) ), + ( 'LSHIFT', ('USB', 0xE1) ), ( 'LEFT SHIFT', ('USB', 0xE1) ), ( 'SHIFT', ('USB', 0xE1) ), + ( 'LALT', ('USB', 0xE2) ), ( 'LEFT ALT', ('USB', 0xE2) ), ( 'ALT', ('USB', 0xE2) ), ( 'ALTERNATE', ('USB', 0xE2) ), ( 'LEFT ALTERNATE', ('USB', 0xE2) ), + ( 'LGUI', ('USB', 0xE3) ), ( 'LEFT GUI', ('USB', 0xE3) ), ( 'GUI', ('USB', 0xE3) ), ( 'SUPER', ('USB', 0xE3) ), ( 'LEFT SUPER', ('USB', 0xE3) ), ( 'WINDOWS', ('USB', 0xE3) ), ( 'LEFT WINDOWS', ('USB', 0xE3) ), ( 'WIN', ('USB', 0xE3) ), ( 'LEFT WIN', ('USB', 0xE3) ), + ( 'RCTRL', ('USB', 0xE4) ), ( 'RIGHT CTRL', ('USB', 0xE4) ), ( 'RIGHT CONTROL', ('USB', 0xE4) ), + ( 'RSHIFT', ('USB', 0xE5) ), ( 'RIGHT SHIFT', ('USB', 0xE5) ), + ( 'RALT', ('USB', 0xE6) ), ( 'RIGHT ALT', ('USB', 0xE6) ), ( 'RIGHT ALTERNATE', ('USB', 0xE6) ), + ( 'RGUI', ('USB', 0xE7) ), ( 'RIGHT GUI', ('USB', 0xE7) ), ( 'RIGHT SUPER', ('USB', 0xE7) ), ( 'RIGHT WINDOWS', ('USB', 0xE7) ), ( 'RIGHT WIN', ('USB', 0xE7) ), - ( 'FUN1', 0xF0 ), ( 'FUNCTION1', 0xF0 ), ( 'FUN', 0xF0 ), - ( 'FUN2', 0xF1 ), ( 'FUNCTION2', 0xF1 ), - ( 'FUN3', 0xF2 ), ( 'FUNCTION3', 0xF2 ), - ( 'FUN4', 0xF3 ), ( 'FUNCTION4', 0xF3 ), - ( 'FUN5', 0xF4 ), ( 'FUNCTION5', 0xF4 ), - ( 'FUN6', 0xF5 ), ( 'FUNCTION6', 0xF5 ), - ( 'FUN7', 0xF6 ), ( 'FUNCTION7', 0xF6 ), - ( 'FUN8', 0xF7 ), ( 'FUNCTION8', 0xF7 ), - ( 'FUN9', 0xF8 ), ( 'FUNCTION9', 0xF8 ), - ( 'FUN10', 0xF9 ), ( 'FUNCTION10', 0xF9 ), - ( 'FUN11', 0xFA ), ( 'FUNCTION11', 0xFA ), - ( 'FUN12', 0xFB ), ( 'FUNCTION12', 0xFB ), - ( 'FUN13', 0xFC ), ( 'FUNCTION13', 0xFC ), - ( 'FUN14', 0xFD ), ( 'FUNCTION14', 0xFD ), - ( 'FUN15', 0xFE ), ( 'FUNCTION15', 0xFE ), - ( 'FUN16', 0xFF ), ( 'FUNCTION16', 0xFF ), + ( 'FUN1', ('USB', 0xF0) ), ( 'FUNCTION1', ('USB', 0xF0) ), ( 'FUN', ('USB', 0xF0) ), + ( 'FUN2', ('USB', 0xF1) ), ( 'FUNCTION2', ('USB', 0xF1) ), + ( 'FUN3', ('USB', 0xF2) ), ( 'FUNCTION3', ('USB', 0xF2) ), + ( 'FUN4', ('USB', 0xF3) ), ( 'FUNCTION4', ('USB', 0xF3) ), + ( 'FUN5', ('USB', 0xF4) ), ( 'FUNCTION5', ('USB', 0xF4) ), + ( 'FUN6', ('USB', 0xF5) ), ( 'FUNCTION6', ('USB', 0xF5) ), + ( 'FUN7', ('USB', 0xF6) ), ( 'FUNCTION7', ('USB', 0xF6) ), + ( 'FUN8', ('USB', 0xF7) ), ( 'FUNCTION8', ('USB', 0xF7) ), + ( 'FUN9', ('USB', 0xF8) ), ( 'FUNCTION9', ('USB', 0xF8) ), + ( 'FUN10', ('USB', 0xF9) ), ( 'FUNCTION10', ('USB', 0xF9) ), + ( 'FUN11', ('USB', 0xFA) ), ( 'FUNCTION11', ('USB', 0xFA) ), + ( 'FUN12', ('USB', 0xFB) ), ( 'FUNCTION12', ('USB', 0xFB) ), + ( 'FUN13', ('USB', 0xFC) ), ( 'FUNCTION13', ('USB', 0xFC) ), + ( 'FUN14', ('USB', 0xFD) ), ( 'FUNCTION14', ('USB', 0xFD) ), + ( 'FUN15', ('USB', 0xFE) ), ( 'FUNCTION15', ('USB', 0xFE) ), + ( 'FUN16', ('USB', 0xFF) ), ( 'FUNCTION16', ('USB', 0xFF) ), +]) + + + # USB HID LED Codes +kll_hid_lookup_dictionary['LEDCode'] = dict([ + ( 'UNDEFINED', ('LED', 0x00) ), + ( 'NUMLOCK', ('LED', 0x01) ), + ( 'CAPSLOCK', ('LED', 0x02) ), + ( 'SCROLLLOCK', ('LED', 0x03) ), + ( 'COMPOSE', ('LED', 0x04) ), + ( 'KANA', ('LED', 0x05) ), + ( 'POWER', ('LED', 0x06) ), + ( 'SHIFT', ('LED', 0x07) ), + ( 'DONOT_DISTURB', ('LED', 0x08) ), + ( 'MUTE', ('LED', 0x09) ), + ( 'TONEENABLE', ('LED', 0x0A) ), + ( 'HIGHCUTFILTER', ('LED', 0x0B) ), + ( 'LOWCUTFILTER', ('LED', 0x0C) ), + ( 'EQLENABLE', ('LED', 0x0D) ), + ( 'SNDFLD_ON', ('LED', 0x0E) ), + ( 'SURROUNDON', ('LED', 0x0F) ), + ( 'REPEAT', ('LED', 0x10) ), + ( 'STEREO', ('LED', 0x11) ), + ( 'SAMPLERT_DET', ('LED', 0x12) ), + ( 'SPINNING', ('LED', 0x13) ), + ( 'CAV', ('LED', 0x14) ), + ( 'CLV', ('LED', 0x15) ), + ( 'RECFMT_DET', ('LED', 0x16) ), + ( 'OFFHOOK', ('LED', 0x17) ), + ( 'RING', ('LED', 0x18) ), + ( 'MSGWAITING', ('LED', 0x19) ), + ( 'DATAMODE', ('LED', 0x1A) ), + ( 'BATOPERATION', ('LED', 0x1B) ), + ( 'BATOK', ('LED', 0x1C) ), + ( 'BATLOW', ('LED', 0x1D) ), + ( 'SPEAKER', ('LED', 0x1E) ), + ( 'HEADSET', ('LED', 0x1F) ), + ( 'HOLD', ('LED', 0x20) ), + ( 'MICROPHONE', ('LED', 0x21) ), + ( 'COVERAGE', ('LED', 0x22) ), + ( 'NIGHTMODE', ('LED', 0x23) ), + ( 'SENDCALLS', ('LED', 0x24) ), + ( 'CALLPICKUP', ('LED', 0x25) ), + ( 'CONFERENCE', ('LED', 0x26) ), + ( 'STANDBY', ('LED', 0x27) ), + ( 'CAMERAON', ('LED', 0x28) ), + ( 'CAMERAOFF', ('LED', 0x29) ), + ( 'ONLINE', ('LED', 0x2A) ), + ( 'OFFLINE', ('LED', 0x2B) ), + ( 'BUSY', ('LED', 0x2C) ), + ( 'READY', ('LED', 0x2D) ), + ( 'PAPEROUT', ('LED', 0x2E) ), + ( 'PAPERJAM', ('LED', 0x2F) ), + ( 'REMOTE', ('LED', 0x30) ), + ( 'FORWARD', ('LED', 0x31) ), + ( 'REVERSE', ('LED', 0x32) ), + ( 'STOP', ('LED', 0x33) ), + ( 'REWIND', ('LED', 0x34) ), + ( 'FASTFORWARD', ('LED', 0x35) ), + ( 'PLAY', ('LED', 0x36) ), + ( 'PAUSE', ('LED', 0x37) ), + ( 'RECORD', ('LED', 0x38) ), + ( 'ERROR', ('LED', 0x39) ), + ( 'USI', ('LED', 0x3A) ), + ( 'UIUI', ('LED', 0x3B) ), + ( 'UMMI', ('LED', 0x3C) ), + ( 'INDON', ('LED', 0x3D) ), + ( 'INDFLASH', ('LED', 0x3E) ), + ( 'INDSLOW_BLNK', ('LED', 0x3F) ), + ( 'INDFAST_BLNK', ('LED', 0x40) ), + ( 'INDOFF', ('LED', 0x41) ), + ( 'FLASHON_TIME', ('LED', 0x42) ), + ( 'SLWB_ON_TIME', ('LED', 0x43) ), + ( 'SLWB_OFF_TIME', ('LED', 0x44) ), + ( 'FSTB_ON_TIME', ('LED', 0x45) ), + ( 'FSTB_OFF_TIME', ('LED', 0x46) ), + ( 'UIC', ('LED', 0x47) ), + ( 'INDRED', ('LED', 0x48) ), + ( 'INDGREEN', ('LED', 0x49) ), + ( 'INDAMBER', ('LED', 0x4A) ), + ( 'GENERICIND', ('LED', 0x4B) ), + ( 'SYSSUSPEND', ('LED', 0x4C) ), + ( 'EXTPWR_CONN', ('LED', 0x4D) ), +# 0x4E - 0xFFFF Reserved +]) + + +# List of System Controls - USB HID 1.12v2 pg 32 +# NKRO HID Supports 0x81 - 0xB7 +kll_hid_lookup_dictionary['SysCode'] = dict([ + ( 'POWERDOWN', ('SYS', 0x81) ), + ( 'SLEEP', ('SYS', 0x82) ), + ( 'WAKEUP', ('SYS', 0x83) ), + ( 'CONTEXTMENU', ('SYS', 0x84) ), + ( 'MAINMENU', ('SYS', 0x85) ), + ( 'APPMENU', ('SYS', 0x86) ), + ( 'MENUHELP', ('SYS', 0x87) ), + ( 'MENUEXIT', ('SYS', 0x88) ), + ( 'MENUSELECT', ('SYS', 0x89) ), + ( 'MENURIGHT', ('SYS', 0x8A) ), + ( 'MENULEFT', ('SYS', 0x8B) ), + ( 'MENUUP', ('SYS', 0x8C) ), + ( 'MENUDOWN', ('SYS', 0x8D) ), + ( 'COLDRESTART', ('SYS', 0x8E) ), + ( 'WARMRESTART', ('SYS', 0x8F) ), + ( 'DPADUP', ('SYS', 0x90) ), + ( 'DPADDOWN', ('SYS', 0x91) ), + ( 'DPADRIGHT', ('SYS', 0x92) ), + ( 'DPADLEFT', ('SYS', 0x93) ), +# 0x94 - 0x9F Reserved + ( 'DOCK', ('SYS', 0xA0) ), + ( 'UNDOCK', ('SYS', 0xA1) ), + ( 'SETUP', ('SYS', 0xA2) ), + ( 'BREAK', ('SYS', 0xA3) ), + ( 'DEBUGGERBREAK', ('SYS', 0xA4) ), + ( 'APPBREAK', ('SYS', 0xA5) ), + ( 'APPDEBUGGER_BREAK', ('SYS', 0xA6) ), + ( 'SPEAKERMUTE', ('SYS', 0xA7) ), + ( 'HIBERNATE', ('SYS', 0xA8) ), +# 0xA9 - 0xAF Reserved + ( 'DISPINVERT', ('SYS', 0xB0) ), + ( 'DISPINTERNAL', ('SYS', 0xB1) ), + ( 'DISPEXTERNAL', ('SYS', 0xB2) ), + ( 'DISPBOTH', ('SYS', 0xB3) ), + ( 'DISPDUAL', ('SYS', 0xB4) ), + ( 'DISPTOGGLE_INT_EXT', ('SYS', 0xB5) ), + ( 'DISPSWAP_PRI_SEC', ('SYS', 0xB6) ), + ( 'DISPLCD_AUTOSCALE', ('SYS', 0xB7) ), +# 0xB8 - 0xFFFF Reserved +]) + + + # USB HID Consumer Control Codes +# List of Consumer Codes - USB HID 1.12v2 +# Only listing relevant ones, let me know if you need more -HaaTa +# NKRO HID Supports 0x020 - 0x29C +kll_hid_lookup_dictionary['ConsCode'] = dict([ + ( '10', ('CONS', 0x020) ), + ( '100', ('CONS', 0x021) ), + ( 'AMPM', ('CONS', 0x022) ), +# 0x023 - 0x03F Reserved + ( 'POWER', ('CONS', 0x030) ), + ( 'RESET', ('CONS', 0x031) ), + ( 'SLEEP', ('CONS', 0x032) ), + ( 'SLEEPAFTER', ('CONS', 0x033) ), + ( 'SLEEPMODE', ('CONS', 0x034) ), + ( 'ILLUMINATION', ('CONS', 0x035) ), + +# 0x037 - 0x03F Reserved + ( 'MENU', ('CONS', 0x040) ), + ( 'MENUPICK', ('CONS', 0x041) ), + ( 'MENUUP', ('CONS', 0x042) ), + ( 'MENUDOWN', ('CONS', 0x043) ), + ( 'MENULEFT', ('CONS', 0x044) ), + ( 'MENURIGHT', ('CONS', 0x045) ), + ( 'MENUESCAPE', ('CONS', 0x046) ), + ( 'MENUVALUE_INCREASE', ('CONS', 0x047) ), + ( 'MENUVALUE_DECREASE', ('CONS', 0x048) ), +# 0x049 - 0x05F Reserved + ( 'DATAON_SCREEN', ('CONS', 0x060) ), + ( 'CLOSEDCAPTION', ('CONS', 0x061) ), + ( 'CLOSEDCAPTION_SELECT', ('CONS', 0x062) ), + ( 'VCRTV', ('CONS', 0x063) ), + ( 'BROADCASTMODE', ('CONS', 0x064) ), + ( 'SNAPSHOT', ('CONS', 0x065) ), + ( 'STILL', ('CONS', 0x066) ), +# 0x067 - 0x07F Reserved + + ( 'ASSIGNSELECTION', ('CONS', 0x081) ), + ( 'MODESTEP', ('CONS', 0x082) ), + ( 'RECALLLAST', ('CONS', 0x083) ), + ( 'ENTERCHANNEL', ('CONS', 0x084) ), + ( 'ORDERMOVIE', ('CONS', 0x085) ), + + ( 'MEDIACOMPUTER', ('CONS', 0x088) ), + ( 'MEDIATV', ('CONS', 0x089) ), + ( 'MEDIAWWW', ('CONS', 0x08A) ), + ( 'MEDIADVD', ('CONS', 0x08B) ), + ( 'MEDIATELEPHONE', ('CONS', 0x08C) ), + ( 'MEDIAPROGRAM_GUIDE', ('CONS', 0x08D) ), + ( 'MEDIAVIDEO_PHONE', ('CONS', 0x08E) ), + ( 'MEDIASELECT_GAMES', ('CONS', 0x08F) ), + ( 'MEDIASELECT_MESSAGES', ('CONS', 0x090) ), + ( 'MEDIASELECT_CD', ('CONS', 0x091) ), + ( 'MEDIASELECT_VCR', ('CONS', 0x092) ), + ( 'MEDIASELECT_TUNER', ('CONS', 0x093) ), + ( 'QUIT', ('CONS', 0x094) ), + ( 'HELP', ('CONS', 0x095) ), + ( 'MEDIASELECT_TAPE', ('CONS', 0x096) ), + ( 'MEDIASELECT_CABLE', ('CONS', 0x097) ), + ( 'MEDIASELECT_SATELLITE', ('CONS', 0x098) ), + ( 'MEDIASELECT_SECURITY', ('CONS', 0x099) ), + ( 'MEDIASELECT_HOME', ('CONS', 0x09A) ), + ( 'MEDIASELECT_CALL', ('CONS', 0x09B) ), + ( 'CHANNELINCREMENT', ('CONS', 0x09C) ), + ( 'CAHNNELDECREMENT', ('CONS', 0x09D) ), + ( 'MEDIASELECT_SAP', ('CONS', 0x09E) ), +# 0x09F Reserved + ( 'VCRPLUS', ('CONS', 0x0A0) ), + ( 'ONCE', ('CONS', 0x0A1) ), + ( 'DAILY', ('CONS', 0x0A2) ), + ( 'WEEKLY', ('CONS', 0x0A3) ), + ( 'MONTHLY', ('CONS', 0x0A4) ), +# 0x0A5 - 0x0AF Reserved + ( 'PLAY', ('CONS', 0x0B0) ), + ( 'PAUSE', ('CONS', 0x0B1) ), + ( 'RECORD', ('CONS', 0x0B2) ), + ( 'FASTFORWARD', ('CONS', 0x0B3) ), + ( 'REWIND', ('CONS', 0x0B4) ), + ( 'SCANNEXT_TRACK', ('CONS', 0x0B5) ), + ( 'SCANPREVIOUS_TRACK', ('CONS', 0x0B6) ), + ( 'STOP', ('CONS', 0x0B7) ), + ( 'EJECT', ('CONS', 0x0B8) ), + ( 'RANDOMPLAY', ('CONS', 0x0B9) ), + + ( 'REPEAT', ('CONS', 0x0BC) ), + + ( 'TRACKNORMAL', ('CONS', 0x0BE) ), + + ( 'FRAMEFORWARD', ('CONS', 0x0C0) ), + ( 'FRAMEBACK', ('CONS', 0x0C1) ), + ( 'MARK', ('CONS', 0x0C2) ), + ( 'CLEARMARK', ('CONS', 0x0C3) ), + ( 'REPEATFROM_MARK', ('CONS', 0x0C4) ), + ( 'RETURNTO_MARK', ('CONS', 0x0C5) ), + ( 'SEARCHMARK_FORWARDS', ('CONS', 0x0C6) ), + ( 'SEARCHMARK_BACKWARDS', ('CONS', 0x0C7) ), + ( 'COUNTERRESET', ('CONS', 0x0C8) ), + ( 'SHOWCOUNTER', ('CONS', 0x0C9) ), + ( 'TRACKINGINCREMENT', ('CONS', 0x0CA) ), + ( 'TRACKINGDECREMENT', ('CONS', 0x0CB) ), + ( 'STOPEJECT', ('CONS', 0x0CC) ), + ( 'PAUSEPLAY', ('CONS', 0x0CD) ), + ( 'PLAYSKIP', ('CONS', 0x0CE) ), +# 0x0CF - 0x0DF Reserved + + ( 'MUTE', ('CONS', 0x0E2) ), + + ( 'BASSBOOST', ('CONS', 0x0E5) ), + ( 'SURROUNDMODE', ('CONS', 0x0E6) ), + ( 'LOUDNESS', ('CONS', 0x0E7) ), + ( 'MPX', ('CONS', 0x0E8) ), + ( 'VOLUMEUP', ('CONS', 0x0E9) ), + ( 'VOLUMEDOWN', ('CONS', 0x0EA) ), +# 0x0EB - 0x0EF Reserved + ( 'SPEEDSELECT', ('CONS', 0x0F0) ), + ( 'STANDARDPLAY', ('CONS', 0x0F2) ), + ( 'LONGPLAY', ('CONS', 0x0F3) ), + ( 'EXTENDEDPLAY', ('CONS', 0x0F4) ), + ( 'SLOW', ('CONS', 0x0F5) ), +# 0x0F6 - 0x0FF + ( 'FANENABLE', ('CONS', 0x100) ), + + ( 'LIGHTENABLE', ('CONS', 0x102) ), + + ( 'CLIMATECONTROL_ENABLE', ('CONS', 0x104) ), + + ( 'SECURITYENABLE', ('CONS', 0x106) ), + ( 'FIREALARM', ('CONS', 0x107) ), + + ( 'MOTION', ('CONS', 0x10A) ), + ( 'DURESSALARM', ('CONS', 0x10B) ), + ( 'HOLDUPALARM', ('CONS', 0x10C) ), + ( 'MEDICALALARM', ('CONS', 0x10D) ), +# 0x10E - 0x14F Reserved + ( 'BALANCERIGHT', ('CONS', 0x150) ), + ( 'BALANCELEFT', ('CONS', 0x151) ), + ( 'BASSINCR', ('CONS', 0x152) ), + ( 'BASSDECR', ('CONS', 0x153) ), + ( 'TREBLEINCR', ('CONS', 0x154) ), + ( 'TREBLEDECR', ('CONS', 0x155) ), +# 0x156 - 0x15F Reserved + + ( 'SUBCHANNEL_INCREMENT', ('CONS', 0x171) ), + ( 'SUBCHANNEL_DECREMENT', ('CONS', 0x172) ), + ( 'ALTAUDIO_INCREMENT', ('CONS', 0x173) ), + ( 'ALTAUDIO_DECREMENT', ('CONS', 0x174) ), + + +# List of Consumer Codes - USB HID 1.12v2 +# Application Launch Buttons pg 79 + ( 'LAUNCHBUTTON_CONFIG_TOOL', ('CONS', 0x181) ), + ( 'PROGRAMMABLEBUTTON_CONFIG', ('CONS', 0x182) ), + ( 'CONSUMERCONTROL_CONFIG', ('CONS', 0x183) ), + ( 'WORDPROCESSOR', ('CONS', 0x184) ), + ( 'TEXTEDITOR', ('CONS', 0x185) ), + ( 'SPREADSHEET', ('CONS', 0x186) ), + ( 'GRAPHICSEDITOR', ('CONS', 0x187) ), + ( 'PRESENTATIONAPP', ('CONS', 0x188) ), + ( 'DATABASEAPP', ('CONS', 0x189) ), + ( 'EMAILREADER', ('CONS', 0x18A) ), + ( 'NEWSREADER', ('CONS', 0x18B) ), + ( 'VOICEMAIL', ('CONS', 0x18C) ), + ( 'CONTACTSADDRESS_BOOK', ('CONS', 0x18D) ), + ( 'CALENDARSCHEDULE', ('CONS', 0x18E) ), + ( 'TASKPROJECT_MANAGER', ('CONS', 0x18F) ), + ( 'LOGJOURNAL_TIMECARD', ('CONS', 0x190) ), + ( 'CHECKBOOKFINANCE', ('CONS', 0x191) ), + ( 'CALCULATOR', ('CONS', 0x192) ), + ( 'AV_CAPTURE_PLAYBACK', ('CONS', 0x193) ), + ( 'LOCALMACHINE_BROWSER', ('CONS', 0x194) ), + ( 'LANWAN_BROWSER', ('CONS', 0x195) ), + ( 'INTERNETBROWSER', ('CONS', 0x196) ), + ( 'REMOTENETWORKING_ISP_CONNECT', ('CONS', 0x197) ), + ( 'NETWORKCONFERENCE', ('CONS', 0x198) ), + ( 'NETWORKCHAT', ('CONS', 0x199) ), + ( 'TELEPHONYDIALER', ('CONS', 0x19A) ), + ( 'LOGON', ('CONS', 0x19B) ), + ( 'LOGOFF', ('CONS', 0x19C) ), + ( 'LOGONLOGOFF', ('CONS', 0x19D) ), + ( 'TERMINALLOCK_SCREENSAVER', ('CONS', 0x19E) ), + ( 'CONTROLPANEL', ('CONS', 0x19F) ), + ( 'COMMANDLINE_PROCESSOR_RUN', ('CONS', 0x1A0) ), + ( 'PROCESSTASK_MANAGER', ('CONS', 0x1A1) ), + ( 'SELECTTAST_APP', ('CONS', 0x1A2) ), + ( 'NEXTTASK_APP', ('CONS', 0x1A3) ), + ( 'PREVIOUSTASK_APP', ('CONS', 0x1A4) ), + ( 'PREEMPTIVEHALT_TASK_APP', ('CONS', 0x1A5) ), + ( 'INTEGRATEDHELP_CENTER', ('CONS', 0x1A6) ), + ( 'DOCUMENTS', ('CONS', 0x1A7) ), + ( 'THESAURUS', ('CONS', 0x1A8) ), + ( 'DICTIONARY', ('CONS', 0x1A9) ), + ( 'DESKTOP', ('CONS', 0x1AA) ), + ( 'SPELLCHECK', ('CONS', 0x1AB) ), + ( 'GRAMMARCHECK', ('CONS', 0x1AC) ), + ( 'WIRELESSSTATUS', ('CONS', 0x1AD) ), + ( 'KEYBOARDLAYOUT', ('CONS', 0x1AE) ), + ( 'VIRUSPROTECTION', ('CONS', 0x1AF) ), + ( 'ENCRYPTION', ('CONS', 0x1B0) ), + ( 'SCREENSAVER', ('CONS', 0x1B1) ), + ( 'ALARMS', ('CONS', 0x1B2) ), + ( 'CLOCK', ('CONS', 0x1B3) ), + ( 'FILEBROWSER', ('CONS', 0x1B4) ), + ( 'POWERSTATUS', ('CONS', 0x1B5) ), + ( 'IMAGEBROWSER', ('CONS', 0x1B6) ), + ( 'AUDIOBROWSER', ('CONS', 0x1B7) ), + ( 'MOVIEBROWSER', ('CONS', 0x1B8) ), + ( 'DIGITALRIGHTS_MANAGER', ('CONS', 0x1B9) ), + ( 'DIGITALWALLET', ('CONS', 0x1BA) ), +# 0x1BB Reserved + ( 'INSTANTMESSAGING', ('CONS', 0x1BC) ), + ( 'OEMFEATURES_TIPS_TUTORIAL', ('CONS', 0x1BD) ), + ( 'OEMHELP', ('CONS', 0x1BE) ), + ( 'ONLINECOMMUNITY', ('CONS', 0x1BF) ), + ( 'ENTERTAINMENTCONTENT', ('CONS', 0x1C0) ), + ( 'ONLINESHOPPING', ('CONS', 0x1C1) ), + ( 'SMARTCARDINFO_HELP', ('CONS', 0x1C2) ), + ( 'MARKETMONITOR', ('CONS', 0x1C3) ), + ( 'CUSTOMIZEDCORP_NEWS', ('CONS', 0x1C4) ), + ( 'ONLINEACTIVITY', ('CONS', 0x1C5) ), + ( 'SEARCHBROWSER', ('CONS', 0x1C6) ), + ( 'AUDIOPLAYER', ('CONS', 0x1C7) ), + + +# List of Consumer Codes - USB HID 1.12v2 +# Generic GUI Application Controls pg 82 + ( 'NEW', ('CONS', 0x201) ), + ( 'OPEN', ('CONS', 0x202) ), + ( 'CLOSE', ('CONS', 0x203) ), + ( 'EXIT', ('CONS', 0x204) ), + ( 'MAXIMIZE', ('CONS', 0x205) ), + ( 'MINIMIZE', ('CONS', 0x206) ), + ( 'SAVE', ('CONS', 0x207) ), + ( 'PRINT', ('CONS', 0x208) ), + ( 'PROPERTIES', ('CONS', 0x209) ), + ( 'UNDO', ('CONS', 0x21A) ), + ( 'COPY', ('CONS', 0x21B) ), + ( 'CUT', ('CONS', 0x21C) ), + ( 'PASTE', ('CONS', 0x21D) ), + ( 'SELECTALL', ('CONS', 0x21E) ), + ( 'FIND', ('CONS', 0x21F) ), + ( 'FINDAND_REPLACE', ('CONS', 0x220) ), + ( 'SEARCH', ('CONS', 0x221) ), + ( 'GOTO', ('CONS', 0x222) ), + ( 'HOME', ('CONS', 0x223) ), + ( 'BACK', ('CONS', 0x224) ), + ( 'FORWARD', ('CONS', 0x225) ), + ( 'STOP', ('CONS', 0x226) ), + ( 'REFRESH', ('CONS', 0x227) ), + ( 'PREVIOUSLINK', ('CONS', 0x228) ), + ( 'NEXTLINK', ('CONS', 0x229) ), + ( 'BOOKMARKS', ('CONS', 0x22A) ), + ( 'HISTORY', ('CONS', 0x22B) ), + ( 'SUBSCRIPTIONS', ('CONS', 0x22C) ), + ( 'ZOOMIN', ('CONS', 0x22D) ), + ( 'ZOOMOUT', ('CONS', 0x22E) ), + ( 'ZOOM', ('CONS', 0x22F) ), + ( 'FULLSCREEN_VIEW', ('CONS', 0x230) ), + ( 'NORMALVIEW', ('CONS', 0x231) ), + ( 'VIEWTOGGLE', ('CONS', 0x232) ), + ( 'SCROLLUP', ('CONS', 0x233) ), + ( 'SCROLLDOWN', ('CONS', 0x234) ), + ( 'SCROLL', ('CONS', 0x235) ), + ( 'PANLEFT', ('CONS', 0x236) ), + ( 'PANRIGHT', ('CONS', 0x237) ), + ( 'PAN', ('CONS', 0x238) ), + ( 'NEWWINDOW', ('CONS', 0x239) ), + ( 'TILEHORIZONTALLY', ('CONS', 0x23A) ), + ( 'TILEVERTICALLY', ('CONS', 0x23B) ), + ( 'FORMAT', ('CONS', 0x23C) ), + ( 'EDIT', ('CONS', 0x23D) ), + ( 'BOLD', ('CONS', 0x23E) ), + ( 'ITALICS', ('CONS', 0x23F) ), + ( 'UNDERLINE', ('CONS', 0x240) ), + ( 'STRIKETHROUGH', ('CONS', 0x241) ), + ( 'SUBSCRIPT', ('CONS', 0x242) ), + ( 'SUPERSCRIPT', ('CONS', 0x243) ), + ( 'ALLCAPS', ('CONS', 0x244) ), + ( 'ROTATE', ('CONS', 0x245) ), + ( 'RESIZE', ('CONS', 0x246) ), + ( 'FILPHORIZONTAL', ('CONS', 0x247) ), + ( 'FILPVERTICAL', ('CONS', 0x248) ), + ( 'MIRRORHORIZONTAL', ('CONS', 0x249) ), + ( 'MIRRORVERTICAL', ('CONS', 0x24A) ), + ( 'FONTSELECT', ('CONS', 0x24B) ), + ( 'FONTCOLOR', ('CONS', 0x24C) ), + ( 'FONTSIZE', ('CONS', 0x24D) ), + ( 'JUSTIFYLEFT', ('CONS', 0x24E) ), + ( 'JUSTIFYCENTER_H', ('CONS', 0x24F) ), + ( 'JUSTIFYRIGHT', ('CONS', 0x250) ), + ( 'JUSTIFYBLOCK_H', ('CONS', 0x251) ), + ( 'JUSTIFYTOP', ('CONS', 0x252) ), + ( 'JUSTIFYCENTER_V', ('CONS', 0x253) ), + ( 'JUSTIFYBOTTOM', ('CONS', 0x254) ), + ( 'JUSTIFYBLOCK_V', ('CONS', 0x255) ), + ( 'INDENTDECREASE', ('CONS', 0x256) ), + ( 'INDENTINCREASE', ('CONS', 0x257) ), + ( 'NUMBEREDLIST', ('CONS', 0x258) ), + ( 'RESTARTNUMBERING', ('CONS', 0x259) ), + ( 'BULLETEDLIST', ('CONS', 0x25A) ), + ( 'PROMOTE', ('CONS', 0x25B) ), + ( 'DEMOTE', ('CONS', 0x25C) ), + ( 'YES', ('CONS', 0x25D) ), + ( 'NO', ('CONS', 0x25E) ), + ( 'CANCEL', ('CONS', 0x25F) ), + ( 'CATALOG', ('CONS', 0x260) ), + ( 'BUYCHECKOUT', ('CONS', 0x261) ), + ( 'ADDTO_CART', ('CONS', 0x262) ), + ( 'EXPAND', ('CONS', 0x263) ), + ( 'EXPANDALL', ('CONS', 0x264) ), + ( 'COLLAPSE', ('CONS', 0x265) ), + ( 'COLLAPSEALL', ('CONS', 0x266) ), + ( 'PRINTPREVIEW', ('CONS', 0x267) ), + ( 'PASTESPECIAL', ('CONS', 0x268) ), + ( 'INSERTMODE', ('CONS', 0x269) ), + ( 'DELETE', ('CONS', 0x26A) ), + ( 'LOCK', ('CONS', 0x26B) ), + ( 'UNLOCK', ('CONS', 0x26C) ), + ( 'PROTECT', ('CONS', 0x26D) ), + ( 'UNPROTECT', ('CONS', 0x26E) ), + ( 'ATTACHCOMMENT', ('CONS', 0x26F) ), + ( 'DELETECOMMENT', ('CONS', 0x270) ), + ( 'VIEWCOMMENT', ('CONS', 0x271) ), + ( 'SELECTWORD', ('CONS', 0x272) ), + ( 'SELECTSENTENCE', ('CONS', 0x273) ), + ( 'SELECTPARAGRAPH', ('CONS', 0x274) ), + ( 'SELECTCOLUMN', ('CONS', 0x275) ), + ( 'SELECTROW', ('CONS', 0x276) ), + ( 'SELECTTABLE', ('CONS', 0x277) ), + ( 'SELECTOBJECT', ('CONS', 0x278) ), + ( 'REDOREPEAT', ('CONS', 0x279) ), + ( 'SORT', ('CONS', 0x27A) ), + ( 'SORTASCENDING', ('CONS', 0x27B) ), + ( 'SORTDESCENDING', ('CONS', 0x27C) ), + ( 'FILTER', ('CONS', 0x27D) ), + ( 'SETCLOCK', ('CONS', 0x27E) ), + ( 'VIEWCLOCK', ('CONS', 0x27F) ), + ( 'SELECTTIME_ZONE', ('CONS', 0x280) ), + ( 'EDITTIME_ZONE', ('CONS', 0x281) ), + ( 'SETALARM', ('CONS', 0x282) ), + ( 'CLEARALARM', ('CONS', 0x283) ), + ( 'SNOOZEALARM', ('CONS', 0x284) ), + ( 'RESETALARM', ('CONS', 0x285) ), + ( 'SYNCHRONIZE', ('CONS', 0x286) ), + ( 'SENDRECEIVE', ('CONS', 0x287) ), + ( 'SENDTO', ('CONS', 0x288) ), + ( 'REPLY', ('CONS', 0x289) ), + ( 'REPLYALL', ('CONS', 0x28A) ), + ( 'FORWARDMSG', ('CONS', 0x28B) ), + ( 'SEND', ('CONS', 0x28C) ), + ( 'ATTACHFILE', ('CONS', 0x28D) ), + ( 'UPLOAD', ('CONS', 0x28E) ), + ( 'DOWNLOAD', ('CONS', 0x28F) ), + ( 'SETBORDERS', ('CONS', 0x290) ), + ( 'INSERTROW', ('CONS', 0x291) ), + ( 'INSERTCOLUMN', ('CONS', 0x292) ), + ( 'INSERTFILE', ('CONS', 0x293) ), + ( 'INSERTPICTURE', ('CONS', 0x294) ), + ( 'INSERTOBJECT', ('CONS', 0x295) ), + ( 'INSERTSYMBOL', ('CONS', 0x296) ), + ( 'SAVEAND_CLOSE', ('CONS', 0x297) ), + ( 'RENAME', ('CONS', 0x298) ), + ( 'MERGE', ('CONS', 0x299) ), + ( 'SPLIT', ('CONS', 0x29A) ), + ( 'DISTRIBUTEHORIZONTALLY', ('CONS', 0x29B) ), + ( 'DISTRIBUTEVERTICALLY', ('CONS', 0x29C) ), +# 0x29D-0xFFFF Reserved ])