announce content of begin/end of line
This commit is contained in:
parent
3eb5fb0f47
commit
c6562281da
@ -5,8 +5,8 @@ KEY_FENRIR,KEY_KP7=review_top
|
|||||||
KEY_KP8=review_curr_line
|
KEY_KP8=review_curr_line
|
||||||
KEY_KP7=review_prev_line
|
KEY_KP7=review_prev_line
|
||||||
KEY_KP9=review_next_line
|
KEY_KP9=review_next_line
|
||||||
#=review_line_end
|
KEY_FENRIR,KEY_KP6=review_line_end
|
||||||
#=review_line_begin
|
KEY_FENRIR,KEY_KP5=review_line_begin
|
||||||
#=present_first_line
|
#=present_first_line
|
||||||
#=present_last_line
|
#=present_last_line
|
||||||
KEY_KP5=review_curr_word
|
KEY_KP5=review_curr_word
|
||||||
@ -20,7 +20,7 @@ KEY_KP3=review_next_char
|
|||||||
KEY_KPDOT=cursor_position
|
KEY_KPDOT=cursor_position
|
||||||
KEY_FENRIR,KEY_I=indent_curr_line
|
KEY_FENRIR,KEY_I=indent_curr_line
|
||||||
KEY_FENRIR,KEY_KPDOT=exit_review
|
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_KP8=curr_screen_before_cursor
|
||||||
KEY_FENRIR,KEY_KP2=curr_screen_after_cursor
|
KEY_FENRIR,KEY_KP2=curr_screen_after_cursor
|
||||||
KEY_FENRIR,KEY_1=set_window_application
|
KEY_FENRIR,KEY_1=set_window_application
|
||||||
|
@ -60,7 +60,7 @@ voice=
|
|||||||
language=english-us
|
language=english-us
|
||||||
|
|
||||||
# Read new text as it happens?
|
# Read new text as it happens?
|
||||||
autoReadIncoming=True
|
autoReadIncomming=True
|
||||||
|
|
||||||
[braille]
|
[braille]
|
||||||
#braille is not implemented yet
|
#braille is not implemented yet
|
||||||
@ -72,7 +72,7 @@ driver=linux
|
|||||||
encoding=cp850
|
encoding=cp850
|
||||||
screenUpdateDelay=0.4
|
screenUpdateDelay=0.4
|
||||||
suspendingScreen=
|
suspendingScreen=
|
||||||
autodetectSuspendingScreen=True
|
autodetectSuspendingScreen=False
|
||||||
|
|
||||||
[keyboard]
|
[keyboard]
|
||||||
driver=evdev
|
driver=evdev
|
||||||
@ -82,24 +82,24 @@ device=AUTO
|
|||||||
grabDevices=True
|
grabDevices=True
|
||||||
ignoreShortcuts=False
|
ignoreShortcuts=False
|
||||||
# the current shortcut layout located in /etc/fenrir/keyboard
|
# the current shortcut layout located in /etc/fenrir/keyboard
|
||||||
keyboardLayout=desktop
|
keyboardLayout=test
|
||||||
# echo chars while typing.
|
# echo chars while typing.
|
||||||
charEcho=False
|
charEcho=True
|
||||||
# echo deleted chars
|
# echo deleted chars
|
||||||
charDeleteEcho=True
|
charDeleteEcho=True
|
||||||
# echo word after pressing space
|
# echo word after pressing space
|
||||||
wordEcho=False
|
wordEcho=True
|
||||||
# interrupt speech on any keypress
|
# interrupt speech on any keypress
|
||||||
interruptOnKeyPress=False
|
interruptOnKeyPress=False
|
||||||
# timeout for double tap in sec
|
# timeout for double tap in sec
|
||||||
doubleTapDelay=0.2
|
doubleTapDelay=0.2
|
||||||
|
|
||||||
[general]
|
[general]
|
||||||
debugLevel=3
|
debugLevel=2
|
||||||
punctuationLevel=Some
|
punctuationLevel=Some
|
||||||
numberOfClipboards=10
|
numberOfClipboards=10
|
||||||
# define the current fenrir key
|
# define the current fenrir key
|
||||||
fenrirKeys=KEY_KP0,KEY_META
|
fenrirKeys=KEY_KP0
|
||||||
timeFormat=%H:%M:%P
|
timeFormat=%H:%M:%P
|
||||||
dateFormat=%A, %B %d, %Y
|
dateFormat=%A, %B %d, %Y
|
||||||
autoSpellCheck=True
|
autoSpellCheck=True
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#!/bin/python
|
#!/bin/python
|
||||||
from utils import char_utils
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Fenrir TTY screen reader
|
# Fenrir TTY screen reader
|
||||||
# By Chrys, Storm Dragon, and contributers.
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
from core import debug
|
from core import debug
|
||||||
|
from utils import char_utils
|
||||||
|
|
||||||
class command():
|
class command():
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
# By Chrys, Storm Dragon, and contributers.
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
from core import debug
|
from core import debug
|
||||||
|
from utils import char_utils
|
||||||
|
|
||||||
class command():
|
class command():
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -14,12 +15,19 @@ class command():
|
|||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
pass
|
pass
|
||||||
def getDescription(self):
|
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):
|
def run(self):
|
||||||
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
||||||
self.env['runtime']['cursorManager'].setReviewCursorPosition(0 ,cursorPos['y'])
|
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):
|
def setCallback(self, callback):
|
||||||
pass
|
pass
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
# By Chrys, Storm Dragon, and contributers.
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
from core import debug
|
from core import debug
|
||||||
|
from utils import char_utils
|
||||||
|
|
||||||
class command():
|
class command():
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -14,12 +15,19 @@ class command():
|
|||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
pass
|
pass
|
||||||
def getDescription(self):
|
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):
|
def run(self):
|
||||||
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
||||||
self.env['runtime']['cursorManager'].setReviewCursorPosition(self.env['screenData']['columns']-1 ,cursorPos['y'])
|
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):
|
def setCallback(self, callback):
|
||||||
pass
|
pass
|
||||||
|
@ -57,7 +57,6 @@ class settingsManager():
|
|||||||
kbConfig.close()
|
kbConfig.close()
|
||||||
|
|
||||||
def loadSoundIcons(self, soundIconPath):
|
def loadSoundIcons(self, soundIconPath):
|
||||||
print(soundIconPath + '/soundicons.conf')
|
|
||||||
siConfig = open(soundIconPath + '/soundicons.conf',"r")
|
siConfig = open(soundIconPath + '/soundicons.conf',"r")
|
||||||
while(True):
|
while(True):
|
||||||
line = siConfig.readline()
|
line = siConfig.readline()
|
||||||
|
Loading…
Reference in New Issue
Block a user