]> git.donarmstrong.com Git - kiibohd-kll.git/blobdiff - kll_lib/hid_dict.py
Adding Lock and Latch symbolic names (e.g. Function)
[kiibohd-kll.git] / kll_lib / hid_dict.py
index d92a6c0332bf187a8b9d3087ebdd5e0b70a1aeb4..a0bfc5b3baa736422d4c3de1375cc9c1589e9b69 100644 (file)
@@ -20,6 +20,9 @@
 
 # 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([
+       # Fall-through block
+       ( ('NONE', 0), '' ), # Special case, there are no arguments
+
        # USB HID Keyboard Codes
        ( ('USB', 0x00), 'KEY_NOEVENT' ), # Event, not a physical key
        ( ('USB', 0x01), 'KEY_ERRORROLLOVER' ), # Event, not a physical key
@@ -259,6 +262,39 @@ hid_lookup_dictionary = dict([
        ( ('USB', 0xFD), 'KEY_FUN14' ),
        ( ('USB', 0xFE), 'KEY_FUN15' ),
        ( ('USB', 0xFF), 'KEY_FUN16' ),
+# ('USB', 0x100) to ('USB', 0x11F) for function key placeholders, not valid usb codes (must use a translation .kll file before firmware compilation)
+       ( ('USB', 0x100), 'KEY_LCK1' ),
+       ( ('USB', 0x101), 'KEY_LCK2' ),
+       ( ('USB', 0x102), 'KEY_LCK3' ),
+       ( ('USB', 0x103), 'KEY_LCK4' ),
+       ( ('USB', 0x104), 'KEY_LCK5' ),
+       ( ('USB', 0x105), 'KEY_LCK6' ),
+       ( ('USB', 0x106), 'KEY_LCK7' ),
+       ( ('USB', 0x107), 'KEY_LCK8' ),
+       ( ('USB', 0x108), 'KEY_LCK9' ),
+       ( ('USB', 0x109), 'KEY_LCK10' ),
+       ( ('USB', 0x10A), 'KEY_LCK11' ),
+       ( ('USB', 0x10B), 'KEY_LCK12' ),
+       ( ('USB', 0x10C), 'KEY_LCK13' ),
+       ( ('USB', 0x10D), 'KEY_LCK14' ),
+       ( ('USB', 0x10E), 'KEY_LCK15' ),
+       ( ('USB', 0x10F), 'KEY_LCK16' ),
+       ( ('USB', 0x110), 'KEY_LAT1' ),
+       ( ('USB', 0x111), 'KEY_LAT2' ),
+       ( ('USB', 0x112), 'KEY_LAT3' ),
+       ( ('USB', 0x113), 'KEY_LAT4' ),
+       ( ('USB', 0x114), 'KEY_LAT5' ),
+       ( ('USB', 0x115), 'KEY_LAT6' ),
+       ( ('USB', 0x116), 'KEY_LAT7' ),
+       ( ('USB', 0x117), 'KEY_LAT8' ),
+       ( ('USB', 0x118), 'KEY_LAT9' ),
+       ( ('USB', 0x119), 'KEY_LAT10' ),
+       ( ('USB', 0x11A), 'KEY_LAT11' ),
+       ( ('USB', 0x11B), 'KEY_LAT12' ),
+       ( ('USB', 0x11C), 'KEY_LAT13' ),
+       ( ('USB', 0x11D), 'KEY_LAT14' ),
+       ( ('USB', 0x11E), 'KEY_LAT15' ),
+       ( ('USB', 0x11F), 'KEY_LAT16' ),
 
        # USB HID Consumer Control Codes
 # List of Consumer Codes - USB HID 1.12v2
@@ -972,6 +1008,7 @@ kll_hid_lookup_dictionary['USBCode'] = dict([
        ( '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) ),
 
+# Special Function Shift/Lock/Latch symbolic names (not part of the USB HID spec)
        ( 'FUN1', ('USB', 0xF0) ), ( 'FUNCTION1', ('USB', 0xF0) ), ( 'FUN', ('USB', 0xF0) ),
        ( 'FUN2', ('USB', 0xF1) ), ( 'FUNCTION2', ('USB', 0xF1) ),
        ( 'FUN3', ('USB', 0xF2) ), ( 'FUNCTION3', ('USB', 0xF2) ),
@@ -988,6 +1025,38 @@ kll_hid_lookup_dictionary['USBCode'] = dict([
        ( 'FUN14', ('USB', 0xFD) ), ( 'FUNCTION14', ('USB', 0xFD) ),
        ( 'FUN15', ('USB', 0xFE) ), ( 'FUNCTION15', ('USB', 0xFE) ),
        ( 'FUN16', ('USB', 0xFF) ), ( 'FUNCTION16', ('USB', 0xFF) ),
+       ( 'LCK1', ('USB', 0x100) ), ( 'LOCK1', ('USB', 0x100) ), ( 'LCK', ('USB', 0x100) ),
+       ( 'LCK2', ('USB', 0x101) ), ( 'LOCK2', ('USB', 0x101) ),
+       ( 'LCK3', ('USB', 0x102) ), ( 'LOCK3', ('USB', 0x102) ),
+       ( 'LCK4', ('USB', 0x103) ), ( 'LOCK4', ('USB', 0x103) ),
+       ( 'LCK5', ('USB', 0x104) ), ( 'LOCK5', ('USB', 0x104) ),
+       ( 'LCK6', ('USB', 0x105) ), ( 'LOCK6', ('USB', 0x105) ),
+       ( 'LCK7', ('USB', 0x106) ), ( 'LOCK7', ('USB', 0x106) ),
+       ( 'LCK8', ('USB', 0x107) ), ( 'LOCK8', ('USB', 0x107) ),
+       ( 'LCK9', ('USB', 0x108) ), ( 'LOCK9', ('USB', 0x108) ),
+       ( 'LCK10', ('USB', 0x109) ), ( 'LOCK10', ('USB', 0x109) ),
+       ( 'LCK11', ('USB', 0x10A) ), ( 'LOCK11', ('USB', 0x10A) ),
+       ( 'LCK12', ('USB', 0x10B) ), ( 'LOCK12', ('USB', 0x10B) ),
+       ( 'LCK13', ('USB', 0x10C) ), ( 'LOCK13', ('USB', 0x10C) ),
+       ( 'LCK14', ('USB', 0x10D) ), ( 'LOCK14', ('USB', 0x10D) ),
+       ( 'LCK15', ('USB', 0x10E) ), ( 'LOCK15', ('USB', 0x10E) ),
+       ( 'LCK16', ('USB', 0x10F) ), ( 'LOCK16', ('USB', 0x10F) ),
+       ( 'LAT1', ('USB', 0x110) ), ( 'LATCH1', ('USB', 0x110) ), ( 'LAT', ('USB', 0x110) ),
+       ( 'LAT2', ('USB', 0x111) ), ( 'LATCH2', ('USB', 0x111) ),
+       ( 'LAT3', ('USB', 0x112) ), ( 'LATCH3', ('USB', 0x112) ),
+       ( 'LAT4', ('USB', 0x113) ), ( 'LATCH4', ('USB', 0x113) ),
+       ( 'LAT5', ('USB', 0x114) ), ( 'LATCH5', ('USB', 0x114) ),
+       ( 'LAT6', ('USB', 0x115) ), ( 'LATCH6', ('USB', 0x115) ),
+       ( 'LAT7', ('USB', 0x116) ), ( 'LATCH7', ('USB', 0x116) ),
+       ( 'LAT8', ('USB', 0x117) ), ( 'LATCH8', ('USB', 0x117) ),
+       ( 'LAT9', ('USB', 0x118) ), ( 'LATCH9', ('USB', 0x118) ),
+       ( 'LAT10', ('USB', 0x119) ), ( 'LATCH10', ('USB', 0x119) ),
+       ( 'LAT11', ('USB', 0x11A) ), ( 'LATCH11', ('USB', 0x11A) ),
+       ( 'LAT12', ('USB', 0x11B) ), ( 'LATCH12', ('USB', 0x11B) ),
+       ( 'LAT13', ('USB', 0x11C) ), ( 'LATCH13', ('USB', 0x11C) ),
+       ( 'LAT14', ('USB', 0x11D) ), ( 'LATCH14', ('USB', 0x11D) ),
+       ( 'LAT15', ('USB', 0x11E) ), ( 'LATCH15', ('USB', 0x11E) ),
+       ( 'LAT16', ('USB', 0x11F) ), ( 'LATCH16', ('USB', 0x11F) ),
 ])
 
 
@@ -1169,11 +1238,11 @@ kll_hid_lookup_dictionary['ConsCode'] = dict([
        ( '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) ),
+       ( 'MEDIASELECTGAMES', ('CONS', 0x08F) ),
+       ( 'MEDIASELECTMESSAGES', ('CONS', 0x090) ),
+       ( 'MEDIASELECTCD', ('CONS', 0x091) ),
+       ( 'MEDIASELECTVCR', ('CONS', 0x092) ),
+       ( 'MEDIASELECTTUNER', ('CONS', 0x093) ),
        ( 'QUIT', ('CONS', 0x094) ),
        ( 'HELP', ('CONS', 0x095) ),
        ( 'MEDIASELECT_TAPE', ('CONS', 0x096) ),
@@ -1197,8 +1266,8 @@ kll_hid_lookup_dictionary['ConsCode'] = dict([
        ( 'RECORD', ('CONS', 0x0B2) ),
        ( 'FASTFORWARD', ('CONS', 0x0B3) ),
        ( 'REWIND', ('CONS', 0x0B4) ),
-       ( 'SCANNEXT_TRACK', ('CONS', 0x0B5) ),
-       ( 'SCANPREVIOUS_TRACK', ('CONS', 0x0B6) ),
+       ( 'SCANNEXTTRACK', ('CONS', 0x0B5) ),
+       ( 'SCANPREVIOUSTRACK', ('CONS', 0x0B6) ),
        ( 'STOP', ('CONS', 0x0B7) ),
        ( 'EJECT', ('CONS', 0x0B8) ),
        ( 'RANDOMPLAY', ('CONS', 0x0B9) ),
@@ -1359,7 +1428,7 @@ kll_hid_lookup_dictionary['ConsCode'] = dict([
        ( 'PASTE', ('CONS', 0x21D) ),
        ( 'SELECTALL', ('CONS', 0x21E) ),
        ( 'FIND', ('CONS', 0x21F) ),
-       ( 'FINDAND_REPLACE', ('CONS', 0x220) ),
+       ( 'FINDANDREPLACE', ('CONS', 0x220) ),
        ( 'SEARCH', ('CONS', 0x221) ),
        ( 'GOTO', ('CONS', 0x222) ),
        ( 'HOME', ('CONS', 0x223) ),
@@ -1478,7 +1547,7 @@ kll_hid_lookup_dictionary['ConsCode'] = dict([
        ( 'INSERTPICTURE', ('CONS', 0x294) ),
        ( 'INSERTOBJECT', ('CONS', 0x295) ),
        ( 'INSERTSYMBOL', ('CONS', 0x296) ),
-       ( 'SAVEAND_CLOSE', ('CONS', 0x297) ),
+       ( 'SAVEANDCLOSE', ('CONS', 0x297) ),
        ( 'RENAME', ('CONS', 0x298) ),
        ( 'MERGE', ('CONS', 0x299) ),
        ( 'SPLIT', ('CONS', 0x29A) ),