4 from keyids import KEYIDS
7 KEYIDS["KEY_RED"]: "red",
8 KEYIDS["KEY_BLUE"]: "blue",
9 KEYIDS["KEY_MENU"]: "menu",
10 KEYIDS["KEY_VIDEO"]: "video"
13 def addKeyBinding(key, context, action):
14 if (context, action) in keyBindings:
15 keyBindings[(context, action)].append(key)
17 keyBindings[(context, action)] = [key]
19 def queryKeyBinding(context, action):
20 if (context, action) in keyBindings:
21 return keyBindings[(context, action)]
25 def getKeyDescription(key):
26 if key in keyDescriptions:
27 return keyDescriptions[key]
28 return "key_%0x" % key