Potential fixes to progress bar. Better handling of punctuation while reading.

This commit is contained in:
Storm Dragon
2025-06-10 18:10:08 -04:00
parent b0ac6e1409
commit 83cb330d34
12 changed files with 49 additions and 22 deletions

View File

@ -5,6 +5,7 @@
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.utils import char_utils
from fenrirscreenreader.utils import word_utils
class command():
def __init__(self):
@ -43,7 +44,13 @@ class command():
if self.env['screen']['newCursor']['x'] == x:
return
x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])
if not currChar.isspace():
if currChar.isspace():
# Only announce spaces during pure navigation (arrow keys)
# Check if this is really navigation by looking at input history
if (self.env['runtime']['inputManager'].getShortcutType() in ['KEY'] and
self.env['runtime']['inputManager'].getLastDeepestInput()[0] in ['KEY_LEFT', 'KEY_RIGHT', 'KEY_UP', 'KEY_DOWN']):
char_utils.presentCharForReview(self.env, currChar, interrupt=True, announceCapital=True, flush=False)
else:
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
def setCallback(self, callback):
pass