X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=kll.py;h=e9ea19b6d26b4647f0829d6c63173610995240c6;hb=57d01ed8725f2d06bd157d2355bb149172708b3b;hp=aab66d27c8fe50ad99bb562292dda469ce44dd50;hpb=114d666bd873a7044917eea5d5e061ed4e45aafd;p=kiibohd-kll.git diff --git a/kll.py b/kll.py index aab66d2..e9ea19b 100755 --- a/kll.py +++ b/kll.py @@ -182,9 +182,10 @@ capabilities_dict = Capabilities() def make_scanCode( token ): scanCode = int( token[1:], 0 ) # Check size, to make sure it's valid - if scanCode > 0xFF: - print ( "{0} ScanCode value {1} is larger than 255".format( ERROR, scanCode ) ) - raise + # XXX Add better check that takes symbolic names into account (i.e. U"Latch5") + #if scanCode > 0xFF: + # print ( "{0} ScanCode value {1} is larger than 255".format( ERROR, scanCode ) ) + # raise return scanCode def make_hidCode( type, token ): @@ -214,9 +215,10 @@ def make_hidCode( type, token ): hidCode = int( token, 0 ) # 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 + # XXX Add better check that takes symbolic names into account (i.e. U"Latch5") + #if type == 'USBCode' and hidCode > 0xFF: + # print ( "{0} USBCode value {1} is larger than 255".format( ERROR, hidCode ) ) + # raise # Return a tuple, identifying which type it is if type == 'USBCode': @@ -273,8 +275,7 @@ def make_seqString( token ): ( ":", 0x01 ), ( "^", -0x10 ), ( "_", -0x18 ), - ( "{}|", -0x1E ), - ( "~", -0x20 ), + ( "{}|~", -0x1E ), ( "@", -0x32 ), ( "?", -0x38 ), )