git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- return 1 for used action
[enigma2.git]
/
keymapparser.py
diff --git
a/keymapparser.py
b/keymapparser.py
index c7bbce1fbfeadb434ed813f524a6c2488748315e..7b64ae04af3436979e1e014aa01a2f8f1c037ce1 100644
(file)
--- a/
keymapparser.py
+++ b/
keymapparser.py
@@
-9,12
+9,14
@@
def readKeymap():
enigma.eActionMap.getInstance(p)
assert p
enigma.eActionMap.getInstance(p)
assert p
- filename = "keymap.xml"
-
+ filename1 = "data/keymap.xml"
+ filename2 = "/usr/share/enigma2/keymap.xml"
+
try:
try:
- source = open(filename)
+ source = open(filename
1
)
except:
except:
- raise "couldn't open keymap.xml!"
+ source = open(filename2)
+# raise "couldn't open keymap.xml!"
try:
dom = xml.dom.minidom.parse(source)
try:
dom = xml.dom.minidom.parse(source)
@@
-42,7
+44,7
@@
def readKeymap():
# try:
flags = sum(map(flag_ascii_to_id, flags))
# try:
flags = sum(map(flag_ascii_to_id, flags))
-
print "-> " + str(flags)
+
#
print "-> " + str(flags)
# except:
# raise str("%s: illegal flags '%s' specificed in context %s, id '%s'" % (filename, flags, context, id))
# except:
# raise str("%s: illegal flags '%s' specificed in context %s, id '%s'" % (filename, flags, context, id))
@@
-65,7
+67,7
@@
def readKeymap():
except:
raise "key id '" + str(id) + "' is illegal"
except:
raise "key id '" + str(id) + "' is illegal"
-
print context + "::" + mapto + " -> " + device + "." + hex(keyid)
+
#
print context + "::" + mapto + " -> " + device + "." + hex(keyid)
p.bindKey(device, keyid, flags, context, mapto)
parseKeys("generic", cmap)
p.bindKey(device, keyid, flags, context, mapto)
parseKeys("generic", cmap)