diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-10-12 00:49:04 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-10-12 00:49:04 +0000 |
| commit | 66795123ebff2381a76b60a3bc81ee55c51ff6fd (patch) | |
| tree | ca3a51120ad7e9cd0006a19426f64629ad5b2a4f /lib/python/Components/ActionMap.py | |
| parent | bd9b9d79572ecb649b26f86dd6bb07d5e6f20766 (diff) | |
| download | enigma2-66795123ebff2381a76b60a3bc81ee55c51ff6fd.tar.gz enigma2-66795123ebff2381a76b60a3bc81ee55c51ff6fd.zip | |
add NumberActionMap for better input of numbers
Diffstat (limited to 'lib/python/Components/ActionMap.py')
| -rw-r--r-- | lib/python/Components/ActionMap.py | 10 |
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 |
