Permalink
Browse files

keymapparser: handle generic key entries before device specific ones

This ensures we'll show the best match in the help screen.
Generic keys are usually keys with only a single function,
e.g. KEY_PAUSE for pause. If a remotecontrol has this key,
we prefer to show that one in the help screen, rather than
a yellow key for instance.
  • Loading branch information...
1 parent 0983614 commit 34cd98d8e90f3be20f92e81a0a018d68096207f5 @pieterg pieterg committed Jan 7, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 keymapparser.py
View
4 keymapparser.py
@@ -63,11 +63,11 @@ def readKeymap(filename):
context = cmap.attrib.get("context")
assert context, "map must have context"
+ parseKeys(context, filename, p, "generic", cmap)
+
for device in cmap.findall("device"):
parseKeys(context, filename, p, device.attrib.get("name"), device)
- parseKeys(context, filename, p, "generic", cmap)
-
def removeKeymap(filename):
p = enigma.eActionMap.getInstance()
p.unbindKeyDomain(filename)

0 comments on commit 34cd98d

Please sign in to comment.