From c8af50a4b30d74d6ee4f8c985177e16edf58e9d1 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Sat, 19 Nov 2005 02:16:16 +0000 Subject: [PATCH] help: improve key description, a bit. --- lib/python/Tools/KeyBindings.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/python/Tools/KeyBindings.py b/lib/python/Tools/KeyBindings.py index b55e3555..cc0a2d14 100644 --- a/lib/python/Tools/KeyBindings.py +++ b/lib/python/Tools/KeyBindings.py @@ -1,6 +1,15 @@ 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) @@ -14,4 +23,6 @@ def queryKeyBinding(context, action): return [ ] def getKeyDescription(key): + if key in keyDescriptions: + return keyDescriptions[key] return "key_%0x" % key -- 2.30.2