git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add debug-msg
[enigma2.git]
/
lib
/
python
/
Tools
/
KeyBindings.py
diff --git
a/lib/python/Tools/KeyBindings.py
b/lib/python/Tools/KeyBindings.py
index b55e35551d777b5549e5b1b3fc4aa0c8bba0a83c..cc0a2d14d81dfa1a76be79702b02e958082e5481 100644
(file)
--- a/
lib/python/Tools/KeyBindings.py
+++ b/
lib/python/Tools/KeyBindings.py
@@
-1,6
+1,15
@@
keyBindings = { }
keyBindings = { }
+from keyids import KEYIDS
+
+keyDescriptions = {
+ KEYIDS["KEY_RED"]: "red",
+ KEYIDS["KEY_BLUE"]: "blue",
+ KEYIDS["KEY_MENU"]: "menu",
+ KEYIDS["KEY_VIDEO"]: "video"
+ }
+
def addKeyBinding(key, context, action):
if (context, action) in keyBindings:
keyBindings[(context, action)].append(key)
def addKeyBinding(key, context, action):
if (context, action) in keyBindings:
keyBindings[(context, action)].append(key)
@@
-14,4
+23,6
@@
def queryKeyBinding(context, action):
return [ ]
def getKeyDescription(key):
return [ ]
def getKeyDescription(key):
+ if key in keyDescriptions:
+ return keyDescriptions[key]
return "key_%0x" % key
return "key_%0x" % key