def keyPressed(self, key, tag): if self.getAutoSleepWindow(): self.begin = self.end = int(time()) + int(self.autosleepdelay)*60