From 42c2c6a5626f3cb3368ea85d73bca09159616a12 Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 25 Mar 2018 13:07:02 +0200 Subject: [PATCH] add sounds for bypass --- .../default-wav/{pty_bypass.wav => PTYBypass.wav} | Bin config/sound/default-wav/soundicons.conf | 2 ++ config/sound/template/soundicons.conf | 2 ++ src/fenrirscreenreader/core/fenrirManager.py | 5 +++++ 4 files changed, 9 insertions(+) rename config/sound/default-wav/{pty_bypass.wav => PTYBypass.wav} (100%) diff --git a/config/sound/default-wav/pty_bypass.wav b/config/sound/default-wav/PTYBypass.wav similarity index 100% rename from config/sound/default-wav/pty_bypass.wav rename to config/sound/default-wav/PTYBypass.wav diff --git a/config/sound/default-wav/soundicons.conf b/config/sound/default-wav/soundicons.conf index 8f6bba93..4fc0f767 100644 --- a/config/sound/default-wav/soundicons.conf +++ b/config/sound/default-wav/soundicons.conf @@ -1,6 +1,8 @@ # Screen Reader Turned On or Off ScreenReaderOn='ScreenReaderOn.wav' ScreenReaderOff='ScreenReaderOff.wav' +# PTY bypass +PTYBypass='PTYBypass.wav' # Cancel the current command Cancel='Cancel.wav' # Accept command diff --git a/config/sound/template/soundicons.conf b/config/sound/template/soundicons.conf index 56242933..e9a5fc02 100644 --- a/config/sound/template/soundicons.conf +++ b/config/sound/template/soundicons.conf @@ -1,6 +1,8 @@ # Screen Reader Turned On or Off ScreenReaderOn='' ScreenReaderOff='' +# PTY bypass +PTYBypass='' # Cancel the current command Cancel='' # Accept command diff --git a/src/fenrirscreenreader/core/fenrirManager.py b/src/fenrirscreenreader/core/fenrirManager.py index fc23528f..c4840865 100644 --- a/src/fenrirscreenreader/core/fenrirManager.py +++ b/src/fenrirscreenreader/core/fenrirManager.py @@ -103,8 +103,13 @@ class fenrirManager(): if escapeSequence in [b'\x1bR', b'^[R']: self.controlMode = not self.controlMode self.switchCtrlModeOnce = 0 + if self.controlMode: + self.environment['runtime']['outputManager'].presentText(_('Sticky Mode On'), soundIcon='Accept', interrupt=True, flush=True) + else: + self.environment['runtime']['outputManager'].presentText(_('Sticky Mode On'), soundIcon='Accept', interrupt=True, flush=True) if escapeSequence in [b'\x1b:', b'^[:']: self.switchCtrlModeOnce = 2 + self.environment['runtime']['outputManager'].presentText(_('bypass'), soundIcon='PTYBypass', interrupt=True, flush=True) def handleExecuteCommand(self, event): if event['Data'] == '':