From: Felix Domke Date: Sun, 16 Dec 2007 20:24:17 +0000 (+0000) Subject: many keyboard improvements by Anders Holst X-Git-Tag: 2.6.0~1663 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/96a171a3f8daf3ebae2990c1bfa10bdeb0c5e87c many keyboard improvements by Anders Holst --- diff --git a/data/keymap.xml b/data/keymap.xml index c10eec4e..f1ee889e 100644 --- a/data/keymap.xml +++ b/data/keymap.xml @@ -22,6 +22,8 @@ + + @@ -38,9 +40,16 @@ - - - + + + + + + + + + + @@ -74,13 +83,13 @@ - - - - + + + + @@ -94,6 +103,8 @@ + + @@ -120,9 +131,16 @@ - - - + + + + + + + + + + @@ -171,6 +189,9 @@ + + + @@ -183,8 +204,13 @@ + + - + + + + @@ -218,9 +244,16 @@ - - - + + + + + + + + + + @@ -233,13 +266,20 @@ - - + + + + + + + + + @@ -269,9 +309,15 @@ + + + + + + - - + + @@ -282,13 +328,17 @@ - - + + + + + + @@ -298,7 +348,11 @@ - + + + + + @@ -314,37 +368,50 @@ + + + - + + + - - - + - - - + + + + + + + + - - - + + + - - - + + + + + + + + @@ -362,6 +429,7 @@ + @@ -373,6 +441,8 @@ + + @@ -488,7 +558,9 @@ + + @@ -505,7 +577,6 @@ - @@ -530,26 +601,36 @@ + + + + + - - + + + + + + + + + + + + + + - - - - - - + - - diff --git a/lib/python/Components/Input.py b/lib/python/Components/Input.py index 64ffdf4f..3c09ab9f 100644 --- a/lib/python/Components/Input.py +++ b/lib/python/Components/Input.py @@ -82,9 +82,7 @@ class Input(VariableText, HTMLComponent, GUIComponent, NumericalTextInput): s = self.instance.calculateSize() return (s.width(), s.height()) - def right(self): - if self.type == self.TEXT: - self.timeout() + def innerright(self): if self.allmarked: self.currPos = 0 self.allmarked = False @@ -94,6 +92,11 @@ class Input(VariableText, HTMLComponent, GUIComponent, NumericalTextInput): else: if self.currPos < len(self.Text): self.currPos += 1 + + def right(self): + if self.type == self.TEXT: + self.timeout() + self.innerright() self.update() def left(self): @@ -181,7 +184,7 @@ class Input(VariableText, HTMLComponent, GUIComponent, NumericalTextInput): self.allmarked = False else: self.insertChar(" ", self.currPos, False, True); - self.currPos += 1 + self.innerright() self.update() def delete(self): @@ -193,7 +196,7 @@ class Input(VariableText, HTMLComponent, GUIComponent, NumericalTextInput): else: self.deleteChar(self.currPos); if self.maxSize and self.overwrite: - self.currPos += 1 + self.innerright() self.update() def deleteBackward(self): @@ -223,7 +226,8 @@ class Input(VariableText, HTMLComponent, GUIComponent, NumericalTextInput): self.deleteAllChars() self.allmarked = False self.insertChar(unichr(code), self.currPos, False, False); - self.right() + self.innerright() + self.update() def number(self, number): if self.type == self.TEXT: @@ -237,5 +241,5 @@ class Input(VariableText, HTMLComponent, GUIComponent, NumericalTextInput): self.allmarked = False self.insertChar(newChar, self.currPos, owr, False); if self.type == self.PIN or self.type == self.NUMBER: - self.right() + self.innerright() self.update() diff --git a/lib/python/Screens/InputBox.py b/lib/python/Screens/InputBox.py index 55334d2f..fe21ea0a 100644 --- a/lib/python/Screens/InputBox.py +++ b/lib/python/Screens/InputBox.py @@ -108,6 +108,13 @@ class PinInput(InputBox): self["tries"] = Label("") self.onShown.append(self.showTries) + def gotAsciiCode(self): + if self["input"].currPos == len(self["input"]) - 1: + InputBox.gotAsciiCode(self) + self.go() + else: + InputBox.gotAsciiCode(self) + def keyNumberGlobal(self, number): if self["input"].currPos == len(self["input"]) - 1: InputBox.keyNumberGlobal(self, number)