add FATAL: before error messages
[enigma2.git] / keymapparser.py
index c6d5306..7131276 100644 (file)
@@ -7,8 +7,7 @@ from keyids import KEYIDS;
 # these are only informational (for help)...
 from Tools.KeyBindings import addKeyBinding
 
-def readKeymap(filename = "/usr/share/enigma2/keymap.xml"):
-
+def readKeymap(filename):
        p = enigma.eActionMap.getInstance()
        assert p
 
@@ -33,7 +32,7 @@ def readKeymap(filename = "/usr/share/enigma2/keymap.xml"):
                                id = x.getAttribute("id")
                                flags = x.getAttribute("flags")
 
-                               flag_ascii_to_id = lambda x: {'m':1,'b':2,'r':4}[x]
+                               flag_ascii_to_id = lambda x: {'m':1,'b':2,'r':4,'l':8}[x]
 
 #                              try:
                                flags = sum(map(flag_ascii_to_id, flags))
@@ -62,13 +61,13 @@ def readKeymap(filename = "/usr/share/enigma2/keymap.xml"):
 
 #                              print context + "::" + mapto + " -> " + device + "." + hex(keyid)
                                p.bindKey(filename, device, keyid, flags, context, mapto)
-                               addKeyBinding(filename, keyid, context, mapto)
-
-               parseKeys("generic", cmap)
+                               addKeyBinding(filename, keyid, context, mapto, flags)
 
                for device in elementsWithTag(cmap.childNodes, "device"):
                        parseKeys(str(device.getAttribute("name")), device)
 
+               parseKeys("generic", cmap)
+
 def removeKeymap(filename):
        p = enigma.eActionMap.getInstance()
        p.unbindKeyDomain(filename)