aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/Components')
-rw-r--r--lib/python/Components/ActionMap.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/python/Components/ActionMap.py b/lib/python/Components/ActionMap.py
index 0ff5098b..cd466c14 100644
--- a/lib/python/Components/ActionMap.py
+++ b/lib/python/Components/ActionMap.py
@@ -24,3 +24,13 @@ class ActionMap:
else:
print "unknown action %s/%s! typo in keymap?" % (context, action)
return 0
+
+
+class NumberActionMap(ActionMap):
+ def action(self, contexts, action):
+ numbers = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
+ if (action in numbers):
+ self.actions[action](int(action))
+ return 1
+ else:
+ return ActionMap.action(self, contexts, action) \ No newline at end of file