diff --git a/config/keyboard/pty.conf b/config/keyboard/pty.conf index 5d20c07e..35471e0c 100644 --- a/config/keyboard/pty.conf +++ b/config/keyboard/pty.conf @@ -16,10 +16,11 @@ ^[[1;3C=review_next_line # alt+shift+left - beginning of line ^[[1;4D=review_line_begin +^[[1;5B=attribute_cursor # alt+shift+right - end of line ^[[1;4C=review_line_end # control+down - review current word -^[[1;5B=review_curr_word +#CHRYS##########################^[[1;5B=review_curr_word # control+left - review previous word ^[[1;5D=review_prev_word # control+right - review next word diff --git a/src/fenrirscreenreader/commands/commands/attribute_cursor.py b/src/fenrirscreenreader/commands/commands/attribute_cursor.py index 9cdca590..12c2d2a7 100644 --- a/src/fenrirscreenreader/commands/commands/attribute_cursor.py +++ b/src/fenrirscreenreader/commands/commands/attribute_cursor.py @@ -19,7 +19,7 @@ class command(): def run(self): cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor() attributes = screen_utils.splitEvery(self.env['screen']['newContentAttrib'], self.env['screen']['columns']) - attributes = attributes[cursorPos['y']][cursorPos['x']] + attributes = self.env['screen']['newContentAttrib'][cursorPos['y']][cursorPos['x']] attributeFormatString = self.env['runtime']['settingsManager'].getSetting('general', 'attributeFormatString') attributeFormatString = self.env['runtime']['screenManager'].formatAttributes(attributes, attributeFormatString) self.env['runtime']['outputManager'].presentText(attributeFormatString, soundIcon='', interrupt=True) diff --git a/src/fenrirscreenreader/core/screenManager.py b/src/fenrirscreenreader/core/screenManager.py index 8795d63c..75dbfe35 100644 --- a/src/fenrirscreenreader/core/screenManager.py +++ b/src/fenrirscreenreader/core/screenManager.py @@ -185,6 +185,7 @@ class screenManager(): # "fontfamily" if not attributeFormatString: attributeFormatString = self.env['runtime']['settingsManager'].getSetting('general', 'attributeFormatString') + print('call') if not attributeFormatString: return '' if attributeFormatString == '': @@ -192,6 +193,7 @@ class screenManager(): if not attribute: return '' if len(attribute) != 10: + print('out',len(attribute),attribute) return '' # 0 FG color (name) try: @@ -264,7 +266,7 @@ class screenManager(): except Exception as e: pass attributeFormatString = attributeFormatString.replace('fenrirFont', _('default')) - + print(attributeFormatString) return attributeFormatString def isSuspendingScreen(self, screen = None): diff --git a/src/fenrirscreenreader/screenDriver/ptyDriver.py b/src/fenrirscreenreader/screenDriver/ptyDriver.py index 8a7041b3..25f042ad 100644 --- a/src/fenrirscreenreader/screenDriver/ptyDriver.py +++ b/src/fenrirscreenreader/screenDriver/ptyDriver.py @@ -39,8 +39,8 @@ class Terminal: start = time.time() for y in range(self.screen.lines): line = self.screen.buffer[y] - attributes = [char[1:] for char in (line[x] for x in range(self.screen.columns)),False, 'default', 'default'] - allAttributes += (attributes) + attributes = [list(char[1:]) + [False, 'default', 'default'] for char in (line[x] for x in range(self.screen.columns))] + allAttributes.append(attributes) print(time.time() -start) self.screen.dirty.clear() return {"cursor": (cursor.x, cursor.y), diff --git a/src/fenrirscreenreader/screenDriver/vcsaDriver.py b/src/fenrirscreenreader/screenDriver/vcsaDriver.py index 9eeb7828..158a9273 100644 --- a/src/fenrirscreenreader/screenDriver/vcsaDriver.py +++ b/src/fenrirscreenreader/screenDriver/vcsaDriver.py @@ -207,7 +207,7 @@ class driver(screenDriver): #ink = 7 #paper = 0 #ch = ' ' - lineAttrib += ( + charAttrib = ( self.fgColorValues[15], # fg self.bgColorValues[0], # bg False, # bold @@ -218,6 +218,7 @@ class driver(screenDriver): False, # blink 'default', # fontsize 'default') # fontfamily + lineAttrib.append(charAttrib) lineText += ' ' continue (sh,) = unpack("=H", data) @@ -241,19 +242,20 @@ class driver(screenDriver): lineText += self.charmap[ch] except KeyError: lineText += '?' - lineAttrib += ( - self.fgColorValues[ink], - self.bgColorValues[paper], - bold == 1, # bold - False, # italics - False, # underscore - False, # strikethrough - False, # reverse - blink == 0, # blink - 'default', # fontsize - 'default') # fontfamily + charAttrib = ( + self.fgColorValues[ink], + self.bgColorValues[paper], + bold == 1, # bold + False, # italics + False, # underscore + False, # strikethrough + False, # reverse + blink == 1, # blink + 'default', # fontsize + 'default') # fontfamily + lineAttrib.append(charAttrib) allText += lineText + '\n' - allAttrib += lineAttrib + allAttrib.append(lineAttrib) return str(allText), allAttrib def getFenrirBGColor(self, attribute): try: