add review begin of line command
This commit is contained in:
parent
9e6dc32241
commit
41fe26d7a3
@ -6,6 +6,7 @@ KEY_KP8=review_curr_line
|
||||
KEY_KP7=review_prev_line
|
||||
KEY_KP9=review_next_line
|
||||
#=review_end_of_line
|
||||
#=review_begin_of_line
|
||||
#=present_first_line
|
||||
#=present_last_line
|
||||
KEY_KP5=review_curr_word
|
||||
|
@ -6,6 +6,7 @@ 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
|
||||
#=review_begin_of_line
|
||||
#=present_first_line
|
||||
#=present_last_line
|
||||
KEY_FENRIR,KEY_K=review_curr_word
|
||||
|
@ -5,7 +5,8 @@ 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
|
||||
#=review_end_of_line
|
||||
KEY_FENRIR,KEY_KP6=review_begin_of_line
|
||||
#=present_first_line
|
||||
#=present_last_line
|
||||
KEY_KP5=review_curr_word
|
||||
|
@ -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
|
||||
|
@ -19,10 +19,7 @@ class command():
|
||||
|
||||
def run(self):
|
||||
# Prefer review cursor over text cursor
|
||||
if self.env['screenData']['newCursorReview']:
|
||||
cursorPos = self.env['screenData']['newCursorReview'].copy()
|
||||
else:
|
||||
cursorPos = self.env['screenData']['newCursor'].copy()
|
||||
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
|
||||
|
||||
textAfterCursor = mark_utils.getTextAfterMark(cursorPos, self.env['screenData']['newContentText'])
|
||||
|
||||
|
@ -49,10 +49,6 @@ class cursorManager():
|
||||
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']
|
||||
|
@ -56,4 +56,4 @@ def getTextAfterMark(mark, inText):
|
||||
return ''
|
||||
if mark == None:
|
||||
return ''
|
||||
return getTextBetweenMarks(mark, {'x':len(inText[0])-1,'y':len(inText)-1}, inText)
|
||||
return getTextBetweenMarks(mark, {'x':len(inText[0]),'y':len(inText)}, inText)
|
||||
|
Loading…
Reference in New Issue
Block a user