# 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
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))
# 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)