aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Tools/NumericalTextInput.py
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2005-11-11 23:57:30 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2005-11-11 23:57:30 +0000
commitad849952739d402553830c5ff080ac9a3edb3f4e (patch)
treee5da8081a450c6d8efe7a9325f2a62c1001954cd /lib/python/Tools/NumericalTextInput.py
parent7b9d3432c8b671621bba5803a0e44cb295f7f6f8 (diff)
downloadenigma2-ad849952739d402553830c5ff080ac9a3edb3f4e.tar.gz
enigma2-ad849952739d402553830c5ff080ac9a3edb3f4e.zip
mobile phone like text input (doesn't update the configList... why?)
Diffstat (limited to 'lib/python/Tools/NumericalTextInput.py')
-rw-r--r--lib/python/Tools/NumericalTextInput.py30
1 files changed, 30 insertions, 0 deletions
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