diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2007-07-11 13:51:02 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2007-07-11 13:51:02 +0000 |
| commit | 0e61797c03c26a8b004dff187a4e26fc6afb26e2 (patch) | |
| tree | 67ceebe02b5140652540ccf6e175d50a3ce93d76 /lib/python | |
| parent | 65a75b9655aa81b1a0c3e6ead3513af5b028cf80 (diff) | |
| download | enigma2-0e61797c03c26a8b004dff187a4e26fc6afb26e2.tar.gz enigma2-0e61797c03c26a8b004dff187a4e26fc6afb26e2.zip | |
show 'l' keypresses in helpscreen
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/HelpMenuList.py | 6 | ||||
| -rw-r--r-- | lib/python/Tools/KeyBindings.py | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/lib/python/Components/HelpMenuList.py b/lib/python/Components/HelpMenuList.py index 0cd2fd2f..e7806bdc 100644 --- a/lib/python/Components/HelpMenuList.py +++ b/lib/python/Components/HelpMenuList.py @@ -22,12 +22,16 @@ class HelpMenuList(GUIComponent): buttons = queryKeyBinding(context, action) name = None + flags = 0 for n in buttons: - name = getKeyDescription(n) + (name, flags) = (getKeyDescription(n[0]), n[1]) if name is not None: break + if flags & 8: # for long keypresses, prepend l_ into the key name. + name = ("l_" + name[0], name[1], name[2]) + entry.append( (actionmap, context, action, name ) ) entry.append( (eListboxPythonMultiContent.TYPE_TEXT, 0, 0, 400, 28, 0, 0, help) ) diff --git a/lib/python/Tools/KeyBindings.py b/lib/python/Tools/KeyBindings.py index 293fee11..09dde74b 100644 --- a/lib/python/Tools/KeyBindings.py +++ b/lib/python/Tools/KeyBindings.py @@ -38,12 +38,13 @@ keyDescriptions = { KEYIDS["KEY_RECORD"]: ("sh_radio", 585, 425) } -def addKeyBinding(domain, key, context, action): - keyBindings.setdefault((context, action), []).append((key, domain)) +def addKeyBinding(domain, key, context, action, flags): + keyBindings.setdefault((context, action), []).append((key, domain, flags)) +# returns a list of (key, flags) for a specified action def queryKeyBinding(context, action): if (context, action) in keyBindings: - return [x[0] for x in keyBindings[(context, action)]] + return [(x[0], x[2]) for x in keyBindings[(context, action)]] else: return [ ] |
