diff --git a/config/keyboard/desktop.conf b/config/keyboard/desktop.conf index a4491cbd..cdca8d9e 100644 --- a/config/keyboard/desktop.conf +++ b/config/keyboard/desktop.conf @@ -74,7 +74,7 @@ KEY_FENRIR,KEY_0=bookmark_10 KEY_FENRIR,KEY_KPSLASH=set_window_application 2,KEY_FENRIR,KEY_KPSLASH=clear_window_application KEY_KPPLUS=progress_bar_monitor -KEY_FENRIR,KEY_KPPLUS=silence_until_prompt +#KEY_FENRIR,KEY_KPPLUS=silence_until_prompt KEY_FENRIR,KEY_F2=toggle_braille KEY_FENRIR,KEY_F3=toggle_sound KEY_FENRIR,KEY_F4=toggle_speech diff --git a/config/keyboard/laptop.conf b/config/keyboard/laptop.conf index 1927d49e..a00978e7 100644 --- a/config/keyboard/laptop.conf +++ b/config/keyboard/laptop.conf @@ -76,7 +76,7 @@ KEY_FENRIR,KEY_F3=toggle_sound KEY_FENRIR,KEY_F4=toggle_speech KEY_FENRIR,KEY_ENTER=temp_disable_speech KEY_FENRIR,KEY_SHIFT,KEY_P=progress_bar_monitor -KEY_FENRIR,KEY_SHIFT,KEY_ENTER=silence_until_prompt +#KEY_FENRIR,KEY_SHIFT,KEY_ENTER=silence_until_prompt KEY_FENRIR,KEY_SHIFT,KEY_CTRL,KEY_P=toggle_punctuation_level KEY_FENRIR,KEY_RIGHTBRACE=toggle_auto_spell_check KEY_FENRIR,KEY_CTRL,KEY_SHIFT,KEY_ENTER=toggle_output diff --git a/config/settings/settings.conf b/config/settings/settings.conf index ba95a9d2..8da5925f 100644 --- a/config/settings/settings.conf +++ b/config/settings/settings.conf @@ -124,7 +124,9 @@ interruptOnKeyPressFilter= doubleTapTimeout=0.2 [general] -debugLevel=0 +# Debug levels: 0=DEACTIVE, 1=ERROR, 2=WARNING, 3=INFO (most verbose) +# For production use, WARNING (2) provides good balance of useful info without spam +debugLevel=2 # debugMode sets where the debug output should send to: # debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log) # debugMode=Print just prints on the screen diff --git a/src/fenrirscreenreader/commands/onByteInput/15000-enable_temp_speech.py b/src/fenrirscreenreader/commands/onByteInput/15000-enable_temp_speech.py index 3aa0bd90..07fa7865 100644 --- a/src/fenrirscreenreader/commands/onByteInput/15000-enable_temp_speech.py +++ b/src/fenrirscreenreader/commands/onByteInput/15000-enable_temp_speech.py @@ -20,6 +20,9 @@ class command(): return self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(self.env['commandBuffer']['enableSpeechOnKeypress'])) self.env['commandBuffer']['enableSpeechOnKeypress'] = False + # Also disable prompt watching since speech was manually re-enabled + if 'silenceUntilPrompt' in self.env['commandBuffer']: + self.env['commandBuffer']['silenceUntilPrompt'] = False self.env['runtime']['outputManager'].presentText(_("speech enabled"), soundIcon='SpeechOn', interrupt=True) def setCallback(self, callback): diff --git a/src/fenrirscreenreader/commands/onKeyInput/15000-enable_temp_speech.py b/src/fenrirscreenreader/commands/onKeyInput/15000-enable_temp_speech.py index 20e662d3..00a5d9a5 100644 --- a/src/fenrirscreenreader/commands/onKeyInput/15000-enable_temp_speech.py +++ b/src/fenrirscreenreader/commands/onKeyInput/15000-enable_temp_speech.py @@ -24,6 +24,9 @@ class command(): return self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(self.env['commandBuffer']['enableSpeechOnKeypress'])) self.env['commandBuffer']['enableSpeechOnKeypress'] = False + # Also disable prompt watching since speech was manually re-enabled + if 'silenceUntilPrompt' in self.env['commandBuffer']: + self.env['commandBuffer']['silenceUntilPrompt'] = False self.env['runtime']['outputManager'].presentText(_("speech enabled"), soundIcon='SpeechOn', interrupt=True) def setCallback(self, callback): diff --git a/src/fenrirscreenreader/commands/onScreenUpdate/66000-prompt_detector.py b/src/fenrirscreenreader/commands/onScreenUpdate/66000-prompt_detector.py index d4d7db5d..28c981f9 100644 --- a/src/fenrirscreenreader/commands/onScreenUpdate/66000-prompt_detector.py +++ b/src/fenrirscreenreader/commands/onScreenUpdate/66000-prompt_detector.py @@ -118,6 +118,9 @@ class command(): """Helper method to restore speech when prompt is detected""" # Disable silence mode self.env['commandBuffer']['silenceUntilPrompt'] = False + # Also disable the keypress-based speech restoration since we're enabling it now + if 'enableSpeechOnKeypress' in self.env['commandBuffer']: + self.env['commandBuffer']['enableSpeechOnKeypress'] = False # Re-enable speech self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', 'True') self.env['runtime']['outputManager'].presentText(_("Speech restored"), soundIcon='SpeechOn', interrupt=True) diff --git a/src/fenrirscreenreader/core/outputManager.py b/src/fenrirscreenreader/core/outputManager.py index a5469448..87a9868c 100644 --- a/src/fenrirscreenreader/core/outputManager.py +++ b/src/fenrirscreenreader/core/outputManager.py @@ -184,6 +184,10 @@ class outputManager(): if self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'): self.presentText(_("speech temporary disabled"), soundIcon='SpeechOff', interrupt=True) self.env['commandBuffer']['enableSpeechOnKeypress'] = True + # Also enable prompt watching for automatic speech restoration + if 'silenceUntilPrompt' not in self.env['commandBuffer']: + self.env['commandBuffer']['silenceUntilPrompt'] = False + self.env['commandBuffer']['silenceUntilPrompt'] = True self.env['runtime']['settingsManager'].setSetting('speech', 'enabled', str(not self.env['runtime']['settingsManager'].getSettingAsBool('speech', 'enabled'))) self.interruptOutput() diff --git a/src/fenrirscreenreader/fenrirVersion.py b/src/fenrirscreenreader/fenrirVersion.py index 85085a53..8dd4884c 100644 --- a/src/fenrirscreenreader/fenrirVersion.py +++ b/src/fenrirscreenreader/fenrirVersion.py @@ -4,5 +4,5 @@ # Fenrir TTY screen reader # By Chrys, Storm Dragon, and contributers. -version = "2025.06.25" +version = "2025.06.28" codeName = "testing"