Skip to content

Commit

Permalink
keymapparser: handle generic key entries before device specific ones
Browse files Browse the repository at this point in the history
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
pieterg committed Jan 7, 2010
1 parent 0983614 commit 34cd98d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keymapparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.