diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2007-11-28 13:07:43 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2007-11-28 13:07:43 +0000 |
| commit | 76ab06c06bdf77f0b0cecd225367862ef0de0d2f (patch) | |
| tree | 5a0c44fbda7cd123261afb39549ef89740a317a5 /lib/python/Tools | |
| parent | 5de16a03d348df3a90dd0c768e0d7fa3d7a82fc1 (diff) | |
| download | enigma2-76ab06c06bdf77f0b0cecd225367862ef0de0d2f.tar.gz enigma2-76ab06c06bdf77f0b0cecd225367862ef0de0d2f.zip | |
improve text editing. Patch by Anders Holst
Diffstat (limited to 'lib/python/Tools')
| -rw-r--r-- | lib/python/Tools/NumericalTextInput.py | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/python/Tools/NumericalTextInput.py b/lib/python/Tools/NumericalTextInput.py index 3379d9a8..2cbc0f4f 100644 --- a/lib/python/Tools/NumericalTextInput.py +++ b/lib/python/Tools/NumericalTextInput.py @@ -31,6 +31,17 @@ class NumericalTextInput: self.mapping.append (u"pqrs7PQRS") # 7 self.mapping.append (u"tuvúù8TUVÚÙ") # 8 self.mapping.append (u"wxyz9WXYZ") # 9 + if self.lang in ['sv_SE', 'fi_FI']: + self.mapping.append (u".,?'\"0-()@/:_") # 0 + self.mapping.append (u" 1") # 1 + self.mapping.append (u"abcåä2ABCÅÄ") # 2 + self.mapping.append (u"defé3DEFÉ") # 3 + self.mapping.append (u"ghi4GHI") # 4 + self.mapping.append (u"jkl5JKL") # 5 + self.mapping.append (u"mnoö6MNOÖ") # 6 + self.mapping.append (u"pqrs7PQRS") # 7 + self.mapping.append (u"tuv8TUV") # 8 + self.mapping.append (u"wxyz9WXYZ") # 9 else: self.mapping.append (u".,?'\"0-()@/:_") # 0 self.mapping.append (u" 1") # 1 @@ -56,11 +67,13 @@ class NumericalTextInput: def getKey(self, num): cnt=0 - if self.timer is not None: - self.timer.start(1000, True) if self.lastKey != num: + if self.lastKey != -1: + self.nextChar() self.lastKey = num self.pos = -1 + if self.timer is not None: + self.timer.start(1000, True) while True: self.pos += 1 if len(self.mapping[num]) <= self.pos: @@ -87,4 +100,5 @@ class NumericalTextInput: self.nextFunction() def timeout(self): - self.nextChar() + if self.lastKey != -1: + self.nextChar() |
