diff --git a/config/settings/settings.conf b/config/settings/settings.conf index 448bd691..46facad3 100644 --- a/config/settings/settings.conf +++ b/config/settings/settings.conf @@ -58,7 +58,7 @@ voice= language=english-us # Read new text as it happens? -autoReadIncomming=True +autoReadIncoming=True [braille] #braille is not implemented yet @@ -69,7 +69,7 @@ layout=en driver=linux encoding=cp850 screenUpdateDelay=0.4 -suspendingScreen= +suspendingScreen=1,2 autodetectSuspendingScreen=False [keyboard] @@ -79,13 +79,13 @@ device=all grabDevices=True ignoreShortcuts=False # the current shortcut layout located in /etc/fenrir/keyboard -keyboardLayout=test +keyboardLayout=desktop # echo chars while typing. -charEcho=True +charEcho=False # echo deleted chars charDeleteEcho=True # echo word after pressing space -wordEcho=True +wordEcho=False # interrupt speech on any keypress interruptOnKeyPress=False # timeout for double tap in sec @@ -96,7 +96,7 @@ debugLevel=0 punctuationLevel=1 numberOfClipboards=10 # define the current fenrir key -fenrirKeys=KEY_KP0 +fenrirKeys=KEY_KP0,KEY_META timeFormat=%H:%M:%P dateFormat=%A, %B %d, %Y autoSpellCheck=True diff --git a/src/fenrir-package/commands/onInput/45000-present_char_if_cursor_change_horizontal.py b/src/fenrir-package/commands/onInput/45000-present_char_if_cursor_change_horizontal.py index f55aba64..9c387055 100644 --- a/src/fenrir-package/commands/onInput/45000-present_char_if_cursor_change_horizontal.py +++ b/src/fenrir-package/commands/onInput/45000-present_char_if_cursor_change_horizontal.py @@ -17,27 +17,22 @@ class command(): return '' def run(self): - currChar = self.env['screenData']['newContentText'].split('\n')[self.env['screenData']['newCursor']['y']][self.env['screenData']['newCursor']['x']] if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']: return - #if self.env['runtime']['inputManager'].noKeyPressed(): - # return + if self.env['runtime']['inputManager'].noKeyPressed(): + return # detect an change on the screen, we just want to cursor arround, so no change should appear if self.env['screenData']['newDelta'] != '': - print('0',currChar ) return if self.env['screenData']['newNegativeDelta'] != '': - print('1',currChar) return # is it a horizontal change? if self.env['screenData']['newCursor']['y'] != self.env['screenData']['oldCursor']['y'] or\ self.env['screenData']['newCursor']['x'] == self.env['screenData']['oldCursor']['x']: - print('2',currChar, self.env['screenData']['newCursor']['x'],self.env['screenData']['oldCursor']['x'],self.env['screenData']['newCursor']['y'] , self.env['screenData']['oldCursor']['y']) return currChar = self.env['screenData']['newContentText'].split('\n')[self.env['screenData']['newCursor']['y']][self.env['screenData']['newCursor']['x']] if not currChar.strip(" \t\n") == '': self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True) - print(currChar) def setCallback(self, callback): pass diff --git a/src/fenrir-package/commands/onInput/50000-char_echo.py b/src/fenrir-package/commands/onInput/50000-char_echo.py index 9ed4232f..82816112 100644 --- a/src/fenrir-package/commands/onInput/50000-char_echo.py +++ b/src/fenrir-package/commands/onInput/50000-char_echo.py @@ -21,7 +21,9 @@ class command(): return # detect deletion or chilling if self.env['screenData']['newCursor']['x'] <= self.env['screenData']['oldCursor']['x']: - return + return + if self.env['runtime']['inputManager'].noKeyPressed(): + return # is there any change? if self.env['screenData']['newDelta'] == '': return diff --git a/src/fenrir-package/commands/onInput/60000-word_echo.py b/src/fenrir-package/commands/onInput/60000-word_echo.py index 46e17c9e..7474e410 100644 --- a/src/fenrir-package/commands/onInput/60000-word_echo.py +++ b/src/fenrir-package/commands/onInput/60000-word_echo.py @@ -24,7 +24,8 @@ class command(): # just when cursor move worddetection is needed if self.env['screenData']['newCursor']['x'] == self.env['screenData']['oldCursor']['x']: return - + if self.env['runtime']['inputManager'].noKeyPressed(): + return # for now no new line if self.env['screenData']['newCursor']['y'] != self.env['screenData']['oldCursor']['y']: return diff --git a/src/fenrir-package/commands/onInput/62000-spell_check.py b/src/fenrir-package/commands/onInput/62000-spell_check.py index d8fd5840..f3c9aa81 100644 --- a/src/fenrir-package/commands/onInput/62000-spell_check.py +++ b/src/fenrir-package/commands/onInput/62000-spell_check.py @@ -32,7 +32,8 @@ class command(): def run(self): if not self.env['runtime']['settingsManager'].getSettingAsBool('general', 'autoSpellCheck'): return - + if self.env['runtime']['inputManager'].noKeyPressed(): + return if not initialized: return if self.env['runtime']['settingsManager'].getSetting('general', 'spellCheckLanguage') != self.language: @@ -50,7 +51,8 @@ class command(): return if len(self.env['screenData']['newDelta']) > 1: return - + if self.env['screenData']['newNegativeDelta'] != '': + return # first place could not be the end of a word if self.env['screenData']['newCursor']['x'] == 0: return diff --git a/src/fenrir-package/commands/onInput/65000-char_delete_echo.py b/src/fenrir-package/commands/onInput/65000-char_delete_echo.py index 8fada66f..bd7705a1 100644 --- a/src/fenrir-package/commands/onInput/65000-char_delete_echo.py +++ b/src/fenrir-package/commands/onInput/65000-char_delete_echo.py @@ -28,7 +28,8 @@ class command(): if self.env['screenData']['newDelta'].strip() != '': if self.env['screenData']['newDelta'] != self.env['screenData']['oldDelta']: return - + if self.env['runtime']['inputManager'].noKeyPressed(): + return # No deletion if self.env['screenData']['newNegativeDelta'] == '': return diff --git a/src/fenrir-package/fenrir.py b/src/fenrir-package/fenrir.py index 121f493f..863776aa 100755 --- a/src/fenrir-package/fenrir.py +++ b/src/fenrir-package/fenrir.py @@ -37,7 +37,6 @@ class fenrir(): def handleProcess(self): #startTime = time.time() eventReceived = self.environment['runtime']['inputManager'].getInputEvent() - print(eventReceived) if eventReceived: self.prepareCommand() if not (self.wasCommand or self.environment['runtime']['inputManager'].isFenrirKeyPressed() or self.environment['generalInformation']['tutorialMode']) or self.environment['runtime']['screenManager'].isSuspendingScreen():