diff --git a/config/keyboard/test.conf b/config/keyboard/test.conf index ebf7fbca..b7235885 100644 --- a/config/keyboard/test.conf +++ b/config/keyboard/test.conf @@ -5,8 +5,8 @@ KEY_FENRIR,KEY_KP7=review_top KEY_KP8=review_curr_line KEY_KP7=review_prev_line KEY_KP9=review_next_line -#=review_line_end -#=review_line_begin +KEY_FENRIR,KEY_KP6=review_line_end +KEY_FENRIR,KEY_KP5=review_line_begin #=present_first_line #=present_last_line KEY_KP5=review_curr_word @@ -20,7 +20,7 @@ KEY_KP3=review_next_char KEY_KPDOT=cursor_position KEY_FENRIR,KEY_I=indent_curr_line KEY_FENRIR,KEY_KPDOT=exit_review -KEY_FENRIR,KEY_KP5=curr_screen +#KEY_FENRIR,KEY_KP5=curr_screen KEY_FENRIR,KEY_KP8=curr_screen_before_cursor KEY_FENRIR,KEY_KP2=curr_screen_after_cursor KEY_FENRIR,KEY_1=set_window_application diff --git a/config/settings/settings.conf b/config/settings/settings.conf index 5934063c..54ad8ac7 100644 --- a/config/settings/settings.conf +++ b/config/settings/settings.conf @@ -60,7 +60,7 @@ voice= language=english-us # Read new text as it happens? -autoReadIncoming=True +autoReadIncomming=True [braille] #braille is not implemented yet @@ -72,7 +72,7 @@ driver=linux encoding=cp850 screenUpdateDelay=0.4 suspendingScreen= -autodetectSuspendingScreen=True +autodetectSuspendingScreen=False [keyboard] driver=evdev @@ -82,24 +82,24 @@ device=AUTO grabDevices=True ignoreShortcuts=False # the current shortcut layout located in /etc/fenrir/keyboard -keyboardLayout=desktop +keyboardLayout=test # echo chars while typing. -charEcho=False +charEcho=True # echo deleted chars charDeleteEcho=True # echo word after pressing space -wordEcho=False +wordEcho=True # interrupt speech on any keypress interruptOnKeyPress=False # timeout for double tap in sec doubleTapDelay=0.2 [general] -debugLevel=3 +debugLevel=2 punctuationLevel=Some numberOfClipboards=10 # define the current fenrir key -fenrirKeys=KEY_KP0,KEY_META +fenrirKeys=KEY_KP0 timeFormat=%H:%M:%P dateFormat=%A, %B %d, %Y autoSpellCheck=True diff --git a/src/fenrir-package/commands/commands/review_curr_char.py b/src/fenrir-package/commands/commands/review_curr_char.py index d57b792f..d89622f8 100644 --- a/src/fenrir-package/commands/commands/review_curr_char.py +++ b/src/fenrir-package/commands/commands/review_curr_char.py @@ -1,11 +1,11 @@ #!/bin/python -from utils import char_utils # -*- coding: utf-8 -*- # Fenrir TTY screen reader # By Chrys, Storm Dragon, and contributers. from core import debug +from utils import char_utils class command(): def __init__(self): diff --git a/src/fenrir-package/commands/commands/review_line_begin.py b/src/fenrir-package/commands/commands/review_line_begin.py index 0fd51f82..04dbb38f 100644 --- a/src/fenrir-package/commands/commands/review_line_begin.py +++ b/src/fenrir-package/commands/commands/review_line_begin.py @@ -5,6 +5,7 @@ # By Chrys, Storm Dragon, and contributers. from core import debug +from utils import char_utils class command(): def __init__(self): @@ -14,12 +15,19 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'displays the position of the review cursor' + return 'set review cursor to begin of current line and display the content' def run(self): cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor() self.env['runtime']['cursorManager'].setReviewCursorPosition(0 ,cursorPos['y']) - self.env['runtime']['outputManager'].presentText("begin of line", interrupt=True) + self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], currChar = \ + char_utils.getCurrentChar(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText']) + + if currChar.strip(" \t\n") == '': + self.env['runtime']['outputManager'].presentText("blank" ,interrupt=True) + else: + self.env['runtime']['outputManager'].presentText(currChar ,interrupt=True, ignorePunctuation=True, announceCapital=True) + self.env['runtime']['outputManager'].presentText("begin of line", interrupt=False) def setCallback(self, callback): pass diff --git a/src/fenrir-package/commands/commands/review_line_end.py b/src/fenrir-package/commands/commands/review_line_end.py index 86511ca3..ad7cb18f 100644 --- a/src/fenrir-package/commands/commands/review_line_end.py +++ b/src/fenrir-package/commands/commands/review_line_end.py @@ -5,6 +5,7 @@ # By Chrys, Storm Dragon, and contributers. from core import debug +from utils import char_utils class command(): def __init__(self): @@ -14,12 +15,19 @@ class command(): def shutdown(self): pass def getDescription(self): - return 'displays the position of the review cursor' + return 'set review cursor to end of current line and display the content' def run(self): cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor() self.env['runtime']['cursorManager'].setReviewCursorPosition(self.env['screenData']['columns']-1 ,cursorPos['y']) - self.env['runtime']['outputManager'].presentText("end of line", interrupt=True) + self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], currChar = \ + char_utils.getCurrentChar(self.env['screenData']['newCursorReview']['x'], self.env['screenData']['newCursorReview']['y'], self.env['screenData']['newContentText']) + + if currChar.strip(" \t\n") == '': + self.env['runtime']['outputManager'].presentText("blank" ,interrupt=True) + else: + self.env['runtime']['outputManager'].presentText(currChar ,interrupt=True, ignorePunctuation=True, announceCapital=True) + self.env['runtime']['outputManager'].presentText("end of line", interrupt=False) def setCallback(self, callback): pass diff --git a/src/fenrir-package/core/settingsManager.py b/src/fenrir-package/core/settingsManager.py index c24c65e5..1d404aef 100644 --- a/src/fenrir-package/core/settingsManager.py +++ b/src/fenrir-package/core/settingsManager.py @@ -57,7 +57,6 @@ class settingsManager(): kbConfig.close() def loadSoundIcons(self, soundIconPath): - print(soundIconPath + '/soundicons.conf') siConfig = open(soundIconPath + '/soundicons.conf',"r") while(True): line = siConfig.readline()