tune commands
This commit is contained in:
parent
6c63317e33
commit
6a614c8d6b
@ -37,7 +37,7 @@ class command():
|
||||
return
|
||||
x, y, currChar = char_utils.getCurrentChar(self.env['screenData']['newCursor']['x'], self.env['screenData']['newCursor']['y'], self.env['screenData']['newContentText'])
|
||||
if not currChar.isspace():
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True)
|
||||
self.env['runtime']['outputManager'].presentText(currChar, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -33,7 +33,7 @@ class command():
|
||||
if len(currDelta.strip()) != len(currDelta) and \
|
||||
currDelta.strip() != '':
|
||||
currDelta = currDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True)
|
||||
self.env['runtime']['outputManager'].presentText(currDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -33,7 +33,7 @@ class command():
|
||||
x, y, currLine = line_utils.getCurrentLine(self.env['screenData']['newCursor']['x'], self.env['screenData']['newCursor']['y'], self.env['screenData']['newContentText'])
|
||||
|
||||
if currLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
|
||||
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(currLine, interrupt=True)
|
||||
|
||||
|
@ -50,7 +50,7 @@ class command():
|
||||
return
|
||||
|
||||
if currWord != '':
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True)
|
||||
self.env['runtime']['outputManager'].presentText(currWord, interrupt=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -126,7 +126,7 @@ class command():
|
||||
pass
|
||||
|
||||
if not self.spellChecker.check(currWord):
|
||||
self.env['runtime']['outputManager'].presentText('misspelled',soundIcon='mispell', interrupt=False)
|
||||
self.env['runtime']['outputManager'].presentText('misspelled',soundIcon='mispell', interrupt=False, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -42,7 +42,7 @@ class command():
|
||||
if len(currNegativeDelta.strip()) != len(currNegativeDelta) and \
|
||||
currNegativeDelta.strip() != '':
|
||||
currNegativeDelta = currNegativeDelta.strip()
|
||||
self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True)
|
||||
self.env['runtime']['outputManager'].presentText(currNegativeDelta, interrupt=True, ignorePunctuation=True, announceCapital=True, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -47,7 +47,7 @@ class command():
|
||||
announce = currLine
|
||||
|
||||
if currLine.isspace():
|
||||
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True)
|
||||
self.env['runtime']['outputManager'].presentText("blank", soundIcon='EmptyLine', interrupt=True, flush=False)
|
||||
else:
|
||||
self.env['runtime']['outputManager'].presentText(announce, interrupt=True)
|
||||
self.env['commandsIgnore']['onScreenUpdate']['CHAR_DELETE_ECHO'] = True
|
||||
|
@ -17,8 +17,8 @@ class command():
|
||||
return 'No Description found'
|
||||
|
||||
def run(self):
|
||||
self.env['runtime']['outputManager'].presentText("screen " + str(self.env['screenData']['newTTY']),soundIcon='ChangeTTY', interrupt=True)
|
||||
self.env['runtime']['outputManager'].presentText(self.env['screenData']['newContentText'], interrupt=False)
|
||||
self.env['runtime']['outputManager'].presentText("screen " + str(self.env['screenData']['newTTY']),soundIcon='ChangeTTY', interrupt=True, flush=False)
|
||||
self.env['runtime']['outputManager'].presentText(self.env['screenData']['newContentText'], interrupt=False, flush=False)
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -24,7 +24,7 @@ class outputManager():
|
||||
self.env['runtime']['settingsManager'].shutdownDriver('speechDriver')
|
||||
self.env['runtime']['settingsManager'].shutdownDriver('brailleDriver')
|
||||
|
||||
def presentText(self, text, interrupt=True, soundIcon = '', ignorePunctuation=False, announceCapital=False, flush=False):
|
||||
def presentText(self, text, interrupt=True, soundIcon = '', ignorePunctuation=False, announceCapital=False, flush=True):
|
||||
if text == '':
|
||||
return
|
||||
self.env['runtime']['debug'].writeDebugOut("presentText:\nsoundIcon:'"+soundIcon+"'\nText:\n" + text ,debug.debugLevel.INFO)
|
||||
@ -100,7 +100,7 @@ class outputManager():
|
||||
self.env['runtime']['debug'].writeDebugOut("\"speak\" in outputManager.speakText ",debug.debugLevel.ERROR)
|
||||
self.env['runtime']['debug'].writeDebugOut(str(e),debug.debugLevel.ERROR)
|
||||
|
||||
def brailleText(self, text='', flush=False):
|
||||
def brailleText(self, text='', flush=True):
|
||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('braille', 'enabled'):
|
||||
return
|
||||
if self.env['runtime']['brailleDriver'] == None:
|
||||
|
@ -64,7 +64,7 @@ class fenrir():
|
||||
self.environment['runtime']['commandManager'].executeDefaultTrigger('onScreenChanged')
|
||||
else:
|
||||
self.environment['runtime']['commandManager'].executeDefaultTrigger('onScreenUpdate')
|
||||
self.environment['runtime']['outputManager'].brailleText()
|
||||
self.environment['runtime']['outputManager'].brailleText(flush=False)
|
||||
self.handleCommands()
|
||||
#print(time.time()-startTime)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user