add review to end of line command

This commit is contained in:
chrys 2016-10-02 14:01:54 +02:00
parent 68f4351bd5
commit 9b442c7dab
6 changed files with 22 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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'

View File

@ -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()

View File

@ -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: