def run(self):
     if not self.env['runtime']['settingsManager'].getSettingAsBool('focus', 'cursor'):
         return        
     if self.env['runtime']['screenManager'].isScreenChange():
         return                 
     # detect an change on the screen, we just want to cursor arround, so no change should appear
     if self.env['runtime']['screenManager'].isDelta():
         return
     if self.env['runtime']['screenManager'].isNegativeDelta():
         return
     # is a vertical change?
     if self.env['runtime']['cursorManager'].isCursorVerticalMove():
         return                        
     # is it a horizontal change?
     if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
         return
    
     # echo word insteed of char 
     if self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'wordEcho'):
         if abs(self.env['screen']['oldCursor']['x'] - self.env['screen']['newCursor']['x']) != 1:
             # get the word            
             newContent = self.env['screen']['newContentText'].split('\n')[self.env['screen']['newCursor']['y']]
             x, y, currWord, endOfScreen, lineBreak = \
               word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent) 
             if self.env['screen']['newCursor']['x'] == x:
                 return            
     x, y, currChar = char_utils.getCurrentChar(self.env['screen']['newCursor']['x'], self.env['screen']['newCursor']['y'], self.env['screen']['newContentText'])     
     if not currChar.isspace():
         self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
Beispiel #2
0
 def run(self):
     cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
     self.env['runtime']['cursorManager'].setReviewCursorPosition(self.env['screen']['columns']-1 ,cursorPos['y'])
     self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currChar = \
       char_utils.getCurrentChar(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
     
     self.env['runtime']['outputManager'].presentText(currChar ,interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
     self.env['runtime']['outputManager'].presentText(_("end of line"), interrupt=False)
    def run(self):
        self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()

        self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currChar = \
          char_utils.getCurrentChar(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
        
        if currChar.isspace():
            self.env['runtime']['outputManager'].presentText(_("blank"), interrupt=True, flush=False)
        else:
            currChar = char_utils.getPhonetic(currChar)
            self.env['runtime']['outputManager'].presentText(currChar ,interrupt=True, announceCapital=True, flush=False)
Beispiel #4
0
    def run(self):
        self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()

        self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currChar = \
          char_utils.getCurrentChar(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])
        
        self.env['runtime']['outputManager'].presentText(currChar ,interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
        # is has attribute it enabled?    
        if self.env['runtime']['settingsManager'].getSettingAsBool('general', 'hasAttributes'):
            cursorPos = self.env['screen']['newCursorReview']
            
            if not self.env['runtime']['attributeManager'].hasAttributes(cursorPos):
                return
            self.env['runtime']['outputManager'].presentText('has attribute', soundIcon='HasAttributes', interrupt=False)        
    def run(self):
        self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()

        self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currChar = \
          char_utils.getCurrentChar(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])

        if currChar.isspace():
            self.env['runtime']['outputManager'].presentText(_("blank"),
                                                             interrupt=True,
                                                             flush=False)
        else:
            currChar = char_utils.getPhonetic(currChar)
            self.env['runtime']['outputManager'].presentText(
                currChar, interrupt=True, announceCapital=True, flush=False)
Beispiel #6
0
    def run(self):
        cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor(
        )
        self.env['runtime']['cursorManager'].setReviewCursorPosition(
            self.env['screen']['columns'] - 1, cursorPos['y'])
        self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currChar = \
          char_utils.getCurrentChar(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])

        self.env['runtime']['outputManager'].presentText(
            currChar,
            interrupt=True,
            ignorePunctuation=True,
            announceCapital=True,
            flush=False)
        self.env['runtime']['outputManager'].presentText(_("end of line"),
                                                         interrupt=False)
    def run(self):
        if not self.env['runtime']['settingsManager'].getSettingAsBool(
                'focus', 'cursor'):
            return
        if self.env['runtime']['screenManager'].isScreenChange():
            return
        # detect an change on the screen, we just want to cursor arround, so no change should appear
        if self.env['runtime']['screenManager'].isDelta():
            return
        if self.env['runtime']['screenManager'].isNegativeDelta():
            return
        # is a vertical change?
        if self.env['runtime']['cursorManager'].isCursorVerticalMove():
            return
        # is it a horizontal change?
        if not self.env['runtime']['cursorManager'].isCursorHorizontalMove():
            return

        # echo word insteed of char
        if self.env['runtime']['settingsManager'].getSettingAsBool(
                'keyboard', 'wordEcho'):
            if abs(self.env['screen']['oldCursor']['x'] -
                   self.env['screen']['newCursor']['x']) != 1:
                # get the word
                newContent = self.env['screen']['newContentText'].split('\n')[
                    self.env['screen']['newCursor']['y']]
                x, y, currWord, endOfScreen, lineBreak = \
                  word_utils.getCurrentWord(self.env['screen']['newCursor']['x'], 0, newContent)
                if self.env['screen']['newCursor']['x'] == x:
                    return
        x, y, currChar = char_utils.getCurrentChar(
            self.env['screen']['newCursor']['x'],
            self.env['screen']['newCursor']['y'],
            self.env['screen']['newContentText'])
        if not currChar.isspace():
            self.env['runtime']['outputManager'].presentText(
                currChar,
                interrupt=True,
                ignorePunctuation=True,
                announceCapital=True,
                flush=False)
Beispiel #8
0
    def run(self):
        self.env['runtime']['cursorManager'].enterReviewModeCurrTextCursor()

        self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currChar = \
          char_utils.getCurrentChar(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])

        self.env['runtime']['outputManager'].presentText(
            currChar,
            interrupt=True,
            ignorePunctuation=True,
            announceCapital=True,
            flush=False)
        # is has attribute it enabled?
        if self.env['runtime']['settingsManager'].getSettingAsBool(
                'general', 'hasAttributes'):
            cursorPos = self.env['screen']['newCursorReview']

            if not self.env['runtime']['attributeManager'].hasAttributes(
                    cursorPos):
                return
            self.env['runtime']['outputManager'].presentText(
                'has attribute', soundIcon='HasAttributes', interrupt=False)
    def run(self):
        cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor(
        )
        x, y, currLine = \
          line_utils.getCurrentLine(cursorPos['x'], cursorPos['y'], self.env['screen']['newContentText'])
        if currLine.isspace():
            self.env['runtime']['outputManager'].presentText(
                _("line is empty"), interrupt=True)
            return
        self.env['runtime']['cursorManager'].setReviewCursorPosition(
            (len(currLine) - len(currLine.lstrip())), cursorPos['y'])
        self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], currChar = \
          char_utils.getCurrentChar(self.env['screen']['newCursorReview']['x'], self.env['screen']['newCursorReview']['y'], self.env['screen']['newContentText'])

        self.env['runtime']['outputManager'].presentText(
            currChar,
            interrupt=True,
            ignorePunctuation=True,
            announceCapital=True,
            flush=False)
        self.env['runtime']['outputManager'].presentText(
            _("first character in line indent {0}").format(
                str(len(currLine) - len(currLine.lstrip()))),
            interrupt=False)