<key id="KEY_0" mapto="0" flags="m" />
</map>
+ <map context="TextEntryActions">
+ <key id="KEY_MUTE" mapto="delete" flags="mr" />
+ </map>
<map context="InfobarPVRActions">
<key id="KEY_YELLOW" mapto="pauseService" flags="m" />
def handleKey(self, key):
#this will no change anything on the value itself
#so we can handle it here in gui element
+ if key == config.key["delete"]:
+ self.parent.value = self.parent.value[0:self.markedPos] + self.parent.value[self.markedPos + 1:]
if key == config.key["prevElement"]:
self.textInput.nextKey()
self.markedPos -= 1
self.key = { "choseElement": 0,
"prevElement": 1,
"nextElement": 2,
+ "delete": 3,
"0": 10,
"1": 11,
"2": 12,
self.createConfig()
- self["actions"] = NumberActionMap(["SetupActions"],
+ self["actions"] = NumberActionMap(["SetupActions", "TextEntryActions"],
{
"ok": self.keySelect,
"save": self.keyGo,
"cancel": self.keyCancel,
"left": self.keyLeft,
"right": self.keyRight,
+ "delete": self.keyDelete,
"1": self.keyNumberGlobal,
"2": self.keyNumberGlobal,
"3": self.keyNumberGlobal,
self["config"].handleKey(config.key["prevElement"])
self.newConfig()
+ def keyDelete(self):
+ self["config"].handleKey(config.key["delete"])
+
def keyRightCallback(self, configPath):
currentConfigPath = self["config"].getCurrent()[1].parent.getConfigPath()
# check if we are still on the same config entry