X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/a4c65dae04761e9e5da358e9b4a1159436a6f18b..fce04ebed510a97e17f019a35c327dce78b6d916:/lib/python/Screens/InputBox.py diff --git a/lib/python/Screens/InputBox.py b/lib/python/Screens/InputBox.py index 57745ca7..f3f97752 100644 --- a/lib/python/Screens/InputBox.py +++ b/lib/python/Screens/InputBox.py @@ -15,12 +15,14 @@ class InputBox(Screen): self["text"] = Label(title) self["input"] = Input(**kwargs) - self["actions"] = NumberActionMap(["WizardActions", "InputActions"], + self["actions"] = NumberActionMap(["WizardActions", "InputBoxActions", "AsciiActions"], { + "gotAsciiCode": self.gotAsciiCode, "ok": self.go, "back": self.cancel, "left": self.keyLeft, "right": self.keyRight, + "delete": self.keyDelete, "1": self.keyNumberGlobal, "2": self.keyNumberGlobal, "3": self.keyNumberGlobal, @@ -32,7 +34,12 @@ class InputBox(Screen): "9": self.keyNumberGlobal, "0": self.keyNumberGlobal }, -1) - + rcinput = eRCInput.getInstance() + rcinput.setKeyboardMode(rcinput.kmAscii) + + def gotAsciiCode(self): + self["input"].handleAscii(getPrevAsciiCode()) + def keyLeft(self): self["input"].left() @@ -40,11 +47,17 @@ class InputBox(Screen): self["input"].right() def keyNumberGlobal(self, number): - print "pressed", number self["input"].number(number) + def keyDelete(self): + self["input"].delete() + def go(self): + rcinput = eRCInput.getInstance() + rcinput.setKeyboardMode(rcinput.kmNone) self.close(self["input"].getText()) def cancel(self): - self.close(None) \ No newline at end of file + rcinput = eRCInput.getInstance() + rcinput.setKeyboardMode(rcinput.kmNone) + self.close(None)