From d4313793f5c138a301aa01e979ce5d440ec6e2cf Mon Sep 17 00:00:00 2001 From: chrys Date: Sat, 3 Dec 2016 02:23:26 +0100 Subject: [PATCH] fix print of fenrir key in cases where no command is fired --- config/settings/settings.conf | 2 +- src/fenrir/fenrir.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/settings/settings.conf b/config/settings/settings.conf index dfde4cbd..21e45c2a 100644 --- a/config/settings/settings.conf +++ b/config/settings/settings.conf @@ -104,7 +104,7 @@ newLinePause=True numberOfClipboards=10 emoticons=True # define the current fenrir key -fenrirKeys=KEY_KP0,KEY_META +fenrirKeys=KEY_KP0,KEY_META,KEY_INSERT scriptKey=KEY_COMPOSE timeFormat=%H:%M:%P dateFormat=%A, %B %d, %Y diff --git a/src/fenrir/fenrir.py b/src/fenrir/fenrir.py index 6a9389f9..ed9a6b85 100644 --- a/src/fenrir/fenrir.py +++ b/src/fenrir/fenrir.py @@ -39,7 +39,7 @@ class fenrir(): eventReceived = self.environment['runtime']['inputManager'].getInputEvent() if eventReceived: self.prepareCommand() - if not (self.wasCommand or self.environment['runtime']['inputManager'].isFenrirKeyPressed() or self.environment['runtime']['inputManager'].isScriptKeyPressed() or self.environment['generalInformation']['tutorialMode']) or self.environment['runtime']['screenManager'].isSuspendingScreen(): + if not (self.wasCommand or self.environment['generalInformation']['tutorialMode']) or self.environment['runtime']['screenManager'].isSuspendingScreen(): self.environment['runtime']['inputManager'].writeEventBuffer() if self.environment['runtime']['inputManager'].noKeyPressed(): if self.wasCommand: @@ -78,7 +78,7 @@ class fenrir(): shortcut = self.environment['runtime']['inputManager'].getCurrShortcut() command = self.environment['runtime']['inputManager'].getCommandForShortcut(shortcut) if len(self.environment['input']['prevDeepestInput']) <= len(self.environment['input']['currInput']): - self.wasCommand = command != '' + self.wasCommand = command != '' or self.environment['runtime']['inputManager'].isFenrirKeyPressed() or self.environment['runtime']['inputManager'].isScriptKeyPressed() if command == '': return