fix double presentation of key echo
This commit is contained in:
parent
629fa3576c
commit
79c650577f
@ -31,7 +31,7 @@ class command():
|
|||||||
x, y, currWord = word_utils.getCurrentWord(environment['screenData']['newCursor']['x'], 0, newContent)
|
x, y, currWord = word_utils.getCurrentWord(environment['screenData']['newCursor']['x'], 0, newContent)
|
||||||
if not(newContent[environment['screenData']['newCursor']['x']].strip(" \t\n") == '' and x != environment['screenData']['newCursor']['x']):
|
if not(newContent[environment['screenData']['newCursor']['x']].strip(" \t\n") == '' and x != environment['screenData']['newCursor']['x']):
|
||||||
return environment
|
return environment
|
||||||
|
print('word')
|
||||||
if currWord != '':
|
if currWord != '':
|
||||||
environment['runtime']['outputManager'].presentText(environment, currWord, interrupt=True)
|
environment['runtime']['outputManager'].presentText(environment, currWord, interrupt=True)
|
||||||
|
|
||||||
|
@ -6,12 +6,17 @@ class command():
|
|||||||
def run(self, environment):
|
def run(self, environment):
|
||||||
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'autoReadIncomming'):
|
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'autoReadIncomming'):
|
||||||
return environment
|
return environment
|
||||||
|
# is there something to read?
|
||||||
|
if environment['screenData']['newDelta'] == '':
|
||||||
|
return environment
|
||||||
|
# dont read TTY change
|
||||||
if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:
|
if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:
|
||||||
return environment
|
return environment
|
||||||
if environment['screenData']['newDelta'] == '':
|
# its a cursor movement (experimental) - maybe also check current shortcut string?
|
||||||
return environment
|
if abs(environment['screenData']['newCursor']['x'] - environment['screenData']['oldCursor']['x']) == 1:
|
||||||
|
if len(environment['screenData']['newDelta']) == 1:
|
||||||
|
return environment
|
||||||
|
|
||||||
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newDelta'], interrupt=False)
|
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newDelta'], interrupt=False)
|
||||||
|
|
||||||
return environment
|
return environment
|
||||||
|
Loading…
Reference in New Issue
Block a user