diff --git a/config/keyboard/desktop.conf b/config/keyboard/desktop.conf index fbbed614..8d0eab89 100644 --- a/config/keyboard/desktop.conf +++ b/config/keyboard/desktop.conf @@ -5,6 +5,7 @@ KEY_FENRIR,KEY_KP7=review_top KEY_KP8=review_curr_line KEY_KP7=review_prev_line KEY_KP9=review_next_line +#=review_end_of_line #=present_first_line #=present_last_line KEY_KP5=review_curr_word diff --git a/config/keyboard/laptop.conf b/config/keyboard/laptop.conf index 74e1c6dc..fd53bb9d 100644 --- a/config/keyboard/laptop.conf +++ b/config/keyboard/laptop.conf @@ -5,6 +5,7 @@ KEY_FENRIR,KEY_SHIFT,KEY_U=review_top KEY_FENRIR,KEY_I=review_curr_line KEY_FENRIR,KEY_U=review_prev_line KEY_FENRIR,KEY_O=review_next_line +#=review_end_of_line #=present_first_line #=present_last_line KEY_FENRIR,KEY_K=review_curr_word diff --git a/config/keyboard/test.conf b/config/keyboard/test.conf index d9557cb8..fff98930 100644 --- a/config/keyboard/test.conf +++ b/config/keyboard/test.conf @@ -5,6 +5,7 @@ KEY_FENRIR,KEY_KP7=review_top KEY_KP8=review_curr_line KEY_KP7=review_prev_line KEY_KP9=review_next_line +KEY_FENRIR,KEY_KP6=review_end_of_line #=present_first_line #=present_last_line KEY_KP5=review_curr_word diff --git a/config/sound/default/soundicons.conf b/config/sound/default/soundicons.conf index 02782f10..b7912485 100644 --- a/config/sound/default/soundicons.conf +++ b/config/sound/default/soundicons.conf @@ -46,5 +46,5 @@ HasAttributes='HasAttributes.opus' PromotedText='PromotedText.opus' # missspelled indicator mispell='mispell.opus' -# the for capital letter: +# the for capital letter capital='Caps.opus' diff --git a/src/fenrir-package/core/cursorManager.py b/src/fenrir-package/core/cursorManager.py index 2115232d..52c430a7 100644 --- a/src/fenrir-package/core/cursorManager.py +++ b/src/fenrir-package/core/cursorManager.py @@ -35,14 +35,29 @@ class cursorManager(): else: return self.env['screenData']['newCursor'].copy() def clearReviewCursor(self): + if not self.isReviewMode(): + return self.env['screenData']['oldCursorReview'] = None self.env['screenData']['newCursorReview'] = None + def isReviewMode(self): return self.env['screenData']['newCursorReview'] != None - def enterReviewModeCurrTextCursor(self): + def enterReviewModeCurrTextCursor(self, overwrite=False): + if self.isReviewMode() and not overwrite: + return self.env['screenData']['oldCursorReview'] = self.env['screenData']['newCursorReview'] if not self.env['screenData']['newCursorReview']: self.env['screenData']['newCursorReview'] = self.env['screenData']['newCursor'].copy() + def setReviewCursorPosition(self, x, y): + if not x: + return + if not y: + return + if not self.isReviewMode(): + self.enterReviewModeCurrTextCursor() + self.env['screenData']['oldCursorReview'] = self.env['screenData']['newCursorReview'] + self.env['screenData']['newCursorReview']['x'] = x + self.env['screenData']['newCursorReview']['y'] = y def isApplicationWindowSet(self): try: currApp = self.env['runtime']['applicationManager'].getCurrentApplication() diff --git a/src/fenrir-package/fenrir.py b/src/fenrir-package/fenrir.py index 1b144427..a232d2b8 100755 --- a/src/fenrir-package/fenrir.py +++ b/src/fenrir-package/fenrir.py @@ -4,14 +4,14 @@ # Fenrir TTY screen reader # By Chrys, Storm Dragon, and contributers. -import os, sys, signal, time, inspect +import os, sys, signal, time if not os.getcwd() in sys.path: sys.path.append(os.getcwd()) from core import settingsManager from core import debug -print(inspect.stack()) + class fenrir(): def __init__(self): try: