]> git.donarmstrong.com Git - kiibohd-kll.git/commitdiff
Adding KEYPAD_ASTERISK (also internally renaming ASTERIX to ASTERISK)
authorJacob Alexander <haata@kiibohd.com>
Sat, 21 Feb 2015 05:04:05 +0000 (21:04 -0800)
committerJacob Alexander <haata@kiibohd.com>
Sat, 21 Feb 2015 05:04:05 +0000 (21:04 -0800)
- When possible, use the symbolic names for keys in generatedKeymap.h
  e.g. KEY_A instead of 0x04

backends/kiibohd.py
kll.py
kll_lib/hid_dict.py

index eff049060659b48ae2004c3c19e40edc249f65c9..13d19191078723e6fba83bbab6459c8bf452d1ea 100644 (file)
@@ -186,7 +186,7 @@ class Backend:
 
                                        # Add each of the arguments of the capability
                                        for arg in range( 0, len( resultItem[1] ) ):
-                                               self.fill_dict['ResultMacros'] += "0x{0:02X}, ".format( resultItem[1][ arg ] )
+                                               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
diff --git a/kll.py b/kll.py
index 37cfd5fc285c8d354491726e983c6b96d2f27cac..cc33b578a872cbf1dc92ff36a2ecb46015dc40bf 100755 (executable)
--- a/kll.py
+++ b/kll.py
@@ -401,7 +401,7 @@ def usbCodeToCapability( items ):
                                # Only convert if an integer, otherwise USB Code doesn't need converting
                                if isinstance( items[ variant ][ sequence ][ combo ], int ):
                                        # Use backend capability name and a single argument
-                                       items[ variant ][ sequence ][ combo ] = tuple( [ backend.usbCodeCapability(), tuple( [ items[ variant ][ sequence ][ combo ] ] ) ] )
+                                       items[ variant ][ sequence ][ combo ] = tuple( [ backend.usbCodeCapability(), tuple( [ hid_lookup_dictionary[ items[ variant ][ sequence ][ combo ] ] ] ) ] )
 
        return items
 
index 44afe9d2d3a5c9d2582190d85195b1dd9c849d0b..109da26c171be0e6b5e8f79601e32bccfb95c2b8 100644 (file)
@@ -3,7 +3,7 @@
 #
 # USB Code Lookup Dictionary
 #
-# Copyright (C) 2014 by Jacob Alexander
+# Copyright (C) 2014-2015 by Jacob Alexander
 #
 # This file is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -105,7 +105,7 @@ hid_lookup_dictionary = dict([
        ( 0x52, 'KEY_UP' ),
        ( 0x53, 'KEY_NUM_LOCK' ),
        ( 0x54, 'KEYPAD_SLASH' ),
-       ( 0x55, 'KEYPAD_ASTERIX' ),
+       ( 0x55, 'KEYPAD_ASTERISK' ),
        ( 0x56, 'KEYPAD_MINUS' ),
        ( 0x57, 'KEYPAD_PLUS' ),
        ( 0x58, 'KEYPAD_ENTER' ),
@@ -345,7 +345,7 @@ kll_hid_lookup_dictionary = dict([
        ( 'UP', 0x52 ),
        ( 'NUMLOCK', 0x53 ),
        ( 'P/', 0x54 ), ( 'KEYPAD SLASH', 0x54 ),
-       ( 'P*', 0x55 ), ( 'KEYPAD ASTERIX', 0x55 ),
+       ( 'P*', 0x55 ), ( 'KEYPAD ASTERIX', 0x55 ), ( 'KEYPAD ASTERISK', 0x55 ),
        ( 'P-', 0x56 ), ( 'KEYPAD MINUS', 0x56 ),
        ( 'P+', 0x57 ), ( 'KEYPAD PLUS', 0x57 ),
        ( 'PENTER', 0x58 ), ( 'KEYPAD ENTER', 0x58 ),