add KEY_TEXT
[openblackhole/openblackhole-enigma2.git] / lib / python / Tools / KeyBindings.py
index cc0a2d1..f0a70d5 100644 (file)
@@ -4,10 +4,27 @@ keyBindings = { }
 from keyids import KEYIDS
 
 keyDescriptions = {
-               KEYIDS["KEY_RED"]: "red",
-               KEYIDS["KEY_BLUE"]: "blue",
-               KEYIDS["KEY_MENU"]: "menu",
-               KEYIDS["KEY_VIDEO"]: "video"
+               KEYIDS["BTN_0"]: ("fp_up", 630, 320),
+               KEYIDS["BTN_1"]: ("fp_down", 565, 320),
+               KEYIDS["KEY_OK"]: ("ok", 585, 320),
+               KEYIDS["KEY_UP"]: ("up", 585, 290),
+               KEYIDS["KEY_DOWN"]: ("down", 585, 355),
+               KEYIDS["KEY_POWER"]: ("power", 615, 80),
+               KEYIDS["KEY_RED"]: ("red", 555, 390),
+               KEYIDS["KEY_BLUE"]: ("blue", 640, 390),
+               KEYIDS["KEY_GREEN"]: ("green", 585, 390),
+               KEYIDS["KEY_YELLOW"]: ("yellow", 610, 390),
+               KEYIDS["KEY_MENU"]: ("menu", 645, 290),
+               KEYIDS["KEY_LEFT"]: ("left", 565, 320),
+               KEYIDS["KEY_RIGHT"]: ("right", 630, 320),
+               KEYIDS["KEY_VIDEO"]: ("video", 645, 355),
+               KEYIDS["KEY_INFO"]: ("info", 550, 290),
+               KEYIDS["KEY_AUDIO"]: ("audio", 555, 355),
+               KEYIDS["KEY_TV"]: ("tv", 560, 425),
+               KEYIDS["KEY_RADIO"]: ("radio", 585, 425),
+               KEYIDS["KEY_TEXT"]: ("text", 610, 425),
+               KEYIDS["KEY_NEXT"]: ("next", 635, 203),
+               KEYIDS["KEY_PREVIOUS"]: ("prev", 559, 203)
        }
 
 def addKeyBinding(key, context, action):
@@ -24,5 +41,4 @@ def queryKeyBinding(context, action):
 
 def getKeyDescription(key):
        if key in keyDescriptions:
-               return keyDescriptions[key]
-       return "key_%0x" % key
+               return keyDescriptions.get(key, [ ])