helplist: keys are not anymore secret, at least not for us professionals. skin fixed...
[enigma2.git] / lib / python / Tools / KeyBindings.py
diff --git a/lib/python/Tools/KeyBindings.py b/lib/python/Tools/KeyBindings.py
new file mode 100644 (file)
index 0000000..b55e355
--- /dev/null
@@ -0,0 +1,17 @@
+
+keyBindings = { }
+
+def addKeyBinding(key, context, action):
+       if (context, action) in keyBindings:
+               keyBindings[(context, action)].append(key)
+       else:
+               keyBindings[(context, action)] = [key]
+
+def queryKeyBinding(context, action):
+       if (context, action) in keyBindings:
+               return keyBindings[(context, action)]
+       else:
+               return [ ]
+
+def getKeyDescription(key):
+       return "key_%0x" % key