follow hotplug-ng changes
[enigma2.git] / lib / python / Tools / KeyBindings.py
index 293fee11c3ce0ee1969ddbdcf391bd57ba643362..464598928d8db34f80503646e6e3206f42c1f600 100644 (file)
@@ -32,18 +32,27 @@ keyDescriptions = {
                KEYIDS["KEY_CHANNELUP"]: ("ch_up", 645, 245),
                KEYIDS["KEY_CHANNELDOWN"]: ("ch_down", 630, 270),
                KEYIDS["KEY_0"]: ("0", 598, 203),
+               KEYIDS["KEY_1"]: ("1", 559, 134),
+               KEYIDS["KEY_2"]: ("2", 598, 134),
+               KEYIDS["KEY_3"]: ("3", 635, 134),
+               KEYIDS["KEY_4"]: ("4", 559, 157),
+               KEYIDS["KEY_5"]: ("5", 598, 157),
+               KEYIDS["KEY_6"]: ("6", 635, 157),
+               KEYIDS["KEY_7"]: ("7", 559, 180),
                KEYIDS["KEY_8"]: ("8", 598, 180),
+               KEYIDS["KEY_9"]: ("9", 635, 180),
                KEYIDS["KEY_EXIT"]: ("exit", 598, 255),
                KEYIDS["KEY_STOP"]: ("sh_tv", 560, 425),
                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 [ ]