- make invlidateEntry public
[enigma2.git] / keymapparser.py
index 510a47a..c7bbce1 100644 (file)
@@ -38,7 +38,7 @@ def readKeymap():
                                id = x.getAttribute("id")
                                flags = x.getAttribute("flags")
                                
-                               flag_ascii_to_id = lambda x: {'m':1,'r':2,'b':4}[x]
+                               flag_ascii_to_id = lambda x: {'m':1,'b':2,'r':4}[x]
                                
 #                              try:
                                flags = sum(map(flag_ascii_to_id, flags))
@@ -52,6 +52,13 @@ def readKeymap():
                                
                                if len(id) == 1:
                                        keyid = ord(id) | 0x8000
+                               elif id[0] == '\\':
+                                       if id[1] == 'x':
+                                               keyid = int(id[2:], 0x10) | 0x8000
+                                       elif id[1] == 'd':
+                                               keyid = int(id[2:]) | 0x8000
+                                       else:
+                                               raise "key id '" + str(id) + "' is neither hex nor dec"
                                else:
                                        try:
                                                keyid = KEYIDS[id]
@@ -59,7 +66,7 @@ def readKeymap():
                                                raise "key id '" + str(id) + "' is illegal"
 
                                print context + "::" + mapto + " -> " + device + "." + hex(keyid)
-                               p.bindKey(device, keyid, 7, context, mapto)
+                               p.bindKey(device, keyid, flags, context, mapto)
                
                parseKeys("generic", cmap)