parseactions: fix for unnamed enums
[enigma2.git] / keymapparser.py
index 7b64ae0..23cd5a8 100644 (file)
@@ -3,6 +3,9 @@ import enigma
 
 from keyids import KEYIDS;
 
+# these are only informational (for help)...
+from Tools.KeyBindings import addKeyBinding
+
 def readKeymap():
 
        p = enigma.eActionMapPtr()
@@ -14,8 +17,10 @@ def readKeymap():
                
        try:
                source = open(filename1)
+               filename = filename1
        except:
                source = open(filename2)
+               filename = filename2
 #              raise "couldn't open keymap.xml!"
        
        try:
@@ -69,6 +74,7 @@ def readKeymap():
 
 #                              print context + "::" + mapto + " -> " + device + "." + hex(keyid)
                                p.bindKey(device, keyid, flags, context, mapto)
+                               addKeyBinding(keyid, context, mapto)
                
                parseKeys("generic", cmap)