d867d74eb0cff2a97999027b0db1d2f5234e2fe2
[enigma2.git] / lib / python / Tools / NumericalTextInput.py
1 from enigma import *
2
3 class NumericalTextInput:
4     mapping = []
5     mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 0
6     mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 1
7     mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 2
8     mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 3
9     mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 4
10     mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 5
11     mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 6
12     mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 7
13     mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 8
14     mapping.append (('a', 'b', 'c', 'A', 'B', 'C')) # 9
15     
16                                 
17     def __init__(self, nextFunction):
18         self.nextFunction = nextFunction
19         self.Timer = eTimer()
20         self.Timer.timeout.get().append(self.nextChar)
21     
22     def getKey(self, num):
23         self.Timer.start(1000)
24         return self.mapping[num][0]
25     
26     def nextChar(self):
27         self.Timer.stop()
28         print "Timer done"
29         self.nextFunction()
30