Fixing ascii string macro processing
- Fixing very old naming convention Brace to Bracket - For now, accepting the old Brace names (will be deprecated at some point)
This commit is contained in:
parent
f1bad4de4b
commit
26437c35ad
15
kll.py
15
kll.py
@ -147,7 +147,7 @@ def tokenize( string ):
|
|||||||
( 'ScanCode', ( r'S((0x[0-9a-fA-F]+)|([0-9]+))', ) ),
|
( 'ScanCode', ( r'S((0x[0-9a-fA-F]+)|([0-9]+))', ) ),
|
||||||
( 'ScanCodeStart', ( r'S\[', ) ),
|
( 'ScanCodeStart', ( r'S\[', ) ),
|
||||||
( 'CodeEnd', ( r'\]', ) ),
|
( 'CodeEnd', ( r'\]', ) ),
|
||||||
( 'String', ( r'"[^"]*"', VERBOSE ) ),
|
( 'String', ( r'"[^"]*"', ) ),
|
||||||
( 'SequenceString', ( r"'[^']*'", ) ),
|
( 'SequenceString', ( r"'[^']*'", ) ),
|
||||||
( 'Operator', ( r'=>|:\+|:-|::|:|=', ) ),
|
( 'Operator', ( r'=>|:\+|:-|::|:|=', ) ),
|
||||||
( 'Comma', ( r',', ) ),
|
( 'Comma', ( r',', ) ),
|
||||||
@ -268,16 +268,17 @@ def make_seqString( token ):
|
|||||||
( "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 0x20 ),
|
( "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 0x20 ),
|
||||||
( "+", 0x12 ),
|
( "+", 0x12 ),
|
||||||
( "&(", 0x11 ),
|
( "&(", 0x11 ),
|
||||||
( "!#$%<>", 0x10 ),
|
( "!#$%", 0x10 ),
|
||||||
( "*", 0x0E ),
|
( "*", 0x0E ),
|
||||||
( ")", 0x07 ),
|
( ")", 0x07 ),
|
||||||
( '"', 0x05 ),
|
( '"', 0x05 ),
|
||||||
( ":", 0x01 ),
|
( ":", 0x01 ),
|
||||||
( "^", -0x10 ),
|
( "@", -0x0E ),
|
||||||
( "_", -0x18 ),
|
( "<>?", -0x10 ),
|
||||||
( "{}|~", -0x1E ),
|
( "~", -0x1E ),
|
||||||
( "@", -0x32 ),
|
( "{}|", -0x20 ),
|
||||||
( "?", -0x38 ),
|
( "^", -0x28 ),
|
||||||
|
( "_", -0x32 ),
|
||||||
)
|
)
|
||||||
|
|
||||||
listOfLists = []
|
listOfLists = []
|
||||||
|
@ -71,8 +71,8 @@ hid_lookup_dictionary = dict([
|
|||||||
( ('USB', 0x2C), 'KEY_SPACE' ),
|
( ('USB', 0x2C), 'KEY_SPACE' ),
|
||||||
( ('USB', 0x2D), 'KEY_MINUS' ),
|
( ('USB', 0x2D), 'KEY_MINUS' ),
|
||||||
( ('USB', 0x2E), 'KEY_EQUAL' ),
|
( ('USB', 0x2E), 'KEY_EQUAL' ),
|
||||||
( ('USB', 0x2F), 'KEY_LEFT_BRACE' ),
|
( ('USB', 0x2F), 'KEY_LEFT_BRACKET' ),
|
||||||
( ('USB', 0x30), 'KEY_RIGHT_BRACE' ),
|
( ('USB', 0x30), 'KEY_RIGHT_BRACKET' ),
|
||||||
( ('USB', 0x31), 'KEY_BACKSLASH' ),
|
( ('USB', 0x31), 'KEY_BACKSLASH' ),
|
||||||
( ('USB', 0x32), 'KEY_NUMBER' ),
|
( ('USB', 0x32), 'KEY_NUMBER' ),
|
||||||
( ('USB', 0x33), 'KEY_SEMICOLON' ),
|
( ('USB', 0x33), 'KEY_SEMICOLON' ),
|
||||||
@ -198,8 +198,8 @@ hid_lookup_dictionary = dict([
|
|||||||
( ('USB', 0xB5), 'KEY_CURRENCY_SUB' ),
|
( ('USB', 0xB5), 'KEY_CURRENCY_SUB' ),
|
||||||
( ('USB', 0xB6), 'KEYPAD_LPAREN' ),
|
( ('USB', 0xB6), 'KEYPAD_LPAREN' ),
|
||||||
( ('USB', 0xB7), 'KEYPAD_RPAREN' ),
|
( ('USB', 0xB7), 'KEYPAD_RPAREN' ),
|
||||||
( ('USB', 0xB8), 'KEYPAD_LBRACE' ),
|
( ('USB', 0xB8), 'KEYPAD_LBRACKET' ),
|
||||||
( ('USB', 0xB9), 'KEYPAD_RBRACE' ),
|
( ('USB', 0xB9), 'KEYPAD_RBRACKET' ),
|
||||||
( ('USB', 0xBA), 'KEYPAD_TAB' ),
|
( ('USB', 0xBA), 'KEYPAD_TAB' ),
|
||||||
( ('USB', 0xBB), 'KEYPAD_BACKSPACE' ),
|
( ('USB', 0xBB), 'KEYPAD_BACKSPACE' ),
|
||||||
( ('USB', 0xBC), 'KEYPAD_A' ),
|
( ('USB', 0xBC), 'KEYPAD_A' ),
|
||||||
@ -835,8 +835,8 @@ kll_hid_lookup_dictionary['USBCode'] = dict([
|
|||||||
( 'SPACE', ('USB', 0x2C) ), ( 'SPACEBAR', ('USB', 0x2C) ),
|
( 'SPACE', ('USB', 0x2C) ), ( 'SPACEBAR', ('USB', 0x2C) ),
|
||||||
( '-', ('USB', 0x2D) ), ( 'MINUS', ('USB', 0x2D) ),
|
( '-', ('USB', 0x2D) ), ( 'MINUS', ('USB', 0x2D) ),
|
||||||
( '=', ('USB', 0x2E) ), ( 'EQUALS', ('USB', 0x2E) ), ( 'EQUAL', ('USB', 0x2E) ),
|
( '=', ('USB', 0x2E) ), ( 'EQUALS', ('USB', 0x2E) ), ( 'EQUAL', ('USB', 0x2E) ),
|
||||||
( '{', ('USB', 0x2F) ), ( 'LEFT BRACE', ('USB', 0x2F) ), ( 'LBRACE', ('USB', 0x2F) ),
|
( '[', ('USB', 0x2F) ), ( 'LEFT BRACKET', ('USB', 0x2F) ), ( 'LBRACKET', ('USB', 0x2F) ), ( 'LEFT BRACE', ('USB', 0x2F) ), ( 'LBRACE', ('USB', 0x2F) ),
|
||||||
( '}', ('USB', 0x30) ), ( 'RIGHT BRACE', ('USB', 0x30) ), ( 'RBRACE', ('USB', 0x30) ),
|
( ']', ('USB', 0x30) ), ( 'RIGHT BRACKET', ('USB', 0x30) ), ( 'RBRACKET', ('USB', 0x30) ), ( 'RIGHT BRACE', ('USB', 0x30) ), ( 'RBRACE', ('USB', 0x30) ),
|
||||||
( '\\', ('USB', 0x31) ), ( 'BACKSLASH', ('USB', 0x31) ),
|
( '\\', ('USB', 0x31) ), ( 'BACKSLASH', ('USB', 0x31) ),
|
||||||
( '#', ('USB', 0x32) ), ( 'NUMBER', ('USB', 0x32) ), ( 'HASH', ('USB', 0x32) ),
|
( '#', ('USB', 0x32) ), ( 'NUMBER', ('USB', 0x32) ), ( 'HASH', ('USB', 0x32) ),
|
||||||
( ';', ('USB', 0x33) ), ( 'SEMICOLON', ('USB', 0x33) ),
|
( ';', ('USB', 0x33) ), ( 'SEMICOLON', ('USB', 0x33) ),
|
||||||
|
Reference in New Issue
Block a user