diff options
Diffstat (limited to 'lib/python/Tools')
| -rw-r--r-- | lib/python/Tools/Makefile.am | 2 | ||||
| -rw-r--r-- | lib/python/Tools/NumericalTextInput.py | 30 |
2 files changed, 31 insertions, 1 deletions
diff --git a/lib/python/Tools/Makefile.am b/lib/python/Tools/Makefile.am index 882e523e..d9bd45a2 100644 --- a/lib/python/Tools/Makefile.am +++ b/lib/python/Tools/Makefile.am @@ -1,4 +1,4 @@ installdir = $(LIBDIR)/enigma2/python/Tools install_DATA = \ - FuzzyDate.py XMLTools.py Directories.py __init__.py + FuzzyDate.py XMLTools.py Directories.py NumericalTextInput.py __init__.py diff --git a/lib/python/Tools/NumericalTextInput.py b/lib/python/Tools/NumericalTextInput.py new file mode 100644 index 00000000..d867d74e --- /dev/null +++ b/lib/python/Tools/NumericalTextInput.py @@ -0,0 +1,30 @@ +from enigma import * + +class NumericalTextInput: + mapping = [] + mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 0 + mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 1 + mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 2 + mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 3 + mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 4 + mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 5 + mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 6 + mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 7 + mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 8 + mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 9 + + + def __init__(self, nextFunction): + self.nextFunction = nextFunction + self.Timer = eTimer() + self.Timer.timeout.get().append(self.nextChar) + + def getKey(self, num): + self.Timer.start(1000) + return self.mapping[num][0] + + def nextChar(self): + self.Timer.stop() + print "Timer done" + self.nextFunction() +
\ No newline at end of file |
