diff --git a/src/fenrir-package/commands/commands/toggle_tutorial_mode.py b/src/fenrir-package/commands/commands/toggle_tutorial_mode.py index b4d839b0..f7e4a090 100644 --- a/src/fenrir-package/commands/commands/toggle_tutorial_mode.py +++ b/src/fenrir-package/commands/commands/toggle_tutorial_mode.py @@ -12,9 +12,9 @@ class command(): return 'You are leving the tutorial mode. Press that shortcut again to enter the tutorial mode again.' def run(self, environment): - text = 'you entered the tutorial mode. In that mode the commands are not executed. but you get an description what the shortcut does. to leve the tutorial mode press that shortcut again.' - environment['runtime']['outputManager'].presentText(environment, text, interrupt=True) - environment['generalInformation']['tutorialMode'] = True + text = 'you entered the tutorial mode. In that mode the commands are not executed. but you get an description what the shortcut does. to leve the tutorial mode press that shortcut again.' + environment['runtime']['outputManager'].presentText(environment, text, interrupt=True) + environment['generalInformation']['tutorialMode'] = True return environment def setCallback(self, callback): pass diff --git a/src/fenrir-package/core/inputManager.py b/src/fenrir-package/core/inputManager.py index 082c05a6..b4453cba 100644 --- a/src/fenrir-package/core/inputManager.py +++ b/src/fenrir-package/core/inputManager.py @@ -22,7 +22,7 @@ class inputManager(): timeout = False environment['input']['firstEvent'] = event environment['input']['currEvent'] = event - if not + #if not #print(event) return timeout diff --git a/src/fenrir-package/core/outputManager.py b/src/fenrir-package/core/outputManager.py index 79d186bc..f6a91e88 100644 --- a/src/fenrir-package/core/outputManager.py +++ b/src/fenrir-package/core/outputManager.py @@ -17,7 +17,6 @@ class outputManager(): environment['runtime']['speechDriver'].shutdown(environment) def presentText(self, environment, text, interrupt=True, soundIcon = ''): - print(soundIcon,text) environment['runtime']['debug'].writeDebugOut(environment,"presentText:\nsoundIcon:'"+soundIcon+"'\nText:\n" + text ,debug.debugLevel.INFO) if self.playSoundIcon(environment, soundIcon, interrupt): environment['runtime']['debug'].writeDebugOut(environment,"soundIcon found" ,debug.debugLevel.INFO) diff --git a/src/fenrir-package/core/settingsManager.py b/src/fenrir-package/core/settingsManager.py index 0c952ea6..11dfb325 100644 --- a/src/fenrir-package/core/settingsManager.py +++ b/src/fenrir-package/core/settingsManager.py @@ -45,7 +45,7 @@ class settingsManager(): shortcutKeys.append(key.upper()) shortcut.append(shortcutRepeat) shortcut.append(sorted(shortcutKeys)) - print(str(shortcut)) + print(str(shortcut), commandName) environment['bindings'][str(shortcut)] = commandName kbConfig.close() diff --git a/src/fenrir-package/fenrir.py b/src/fenrir-package/fenrir.py index 9aaa822b..1f400abf 100755 --- a/src/fenrir-package/fenrir.py +++ b/src/fenrir-package/fenrir.py @@ -33,8 +33,9 @@ class fenrir(): self.shutdown() def handleProcess(self): + time.sleep(3) timeout = self.environment['runtime']['inputManager'].proceedInputEvent(self.environment) - timeout = True + timeout = False try: self.environment['runtime']['screenManager'].update(self.environment) except Exception as e: @@ -42,18 +43,17 @@ class fenrir(): self.environment['runtime']['debug'].writeDebugOut(self.environment, str(e),debug.debugLevel.ERROR) if not (self.environment['input']['keyForeward'] or timeout): #currShortcut = self.environment['runtime']['inputManager'].getCurrShortcut(self.environment) - shortcut = '' + shortcut = "[1, ['KEY_FENRIR', 'KEY_T']]" command = self.environment['runtime']['inputManager'].getCommandForShortcut(self.environment, shortcut) self.environment['runtime']['commandManager'].queueCommand(self.environment, command) if not timeout: self.environment['runtime']['commandManager'].executeTriggerCommands(self.environment, 'onInput') self.environment['runtime']['commandManager'].executeTriggerCommands(self.environment, 'onScreenChanged') if not self.environment['input']['keyForeward']: - if self.environment['runtime']['commandManager'].isCommandQueued(): - self.handleCommands() + self.handleCommands() def handleCommands(self): - if (self.environment['commandInfo']['currCommand'] != ''): + if self.environment['runtime']['commandManager'].isCommandQueued(self.environment): self.environment['runtime']['commandManager'].executeCommand(self.environment, self.environment['commandInfo']['currCommand'], 'commands') def shutdownRequest(self):