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)
|
||||
if not(newContent[environment['screenData']['newCursor']['x']].strip(" \t\n") == '' and x != environment['screenData']['newCursor']['x']):
|
||||
return environment
|
||||
|
||||
print('word')
|
||||
if currWord != '':
|
||||
environment['runtime']['outputManager'].presentText(environment, currWord, interrupt=True)
|
||||
|
||||
|
@ -6,10 +6,15 @@ class command():
|
||||
def run(self, environment):
|
||||
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'autoReadIncomming'):
|
||||
return environment
|
||||
|
||||
# is there something to read?
|
||||
if environment['screenData']['newDelta'] == '':
|
||||
return environment
|
||||
# dont read TTY change
|
||||
if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:
|
||||
return environment
|
||||
if environment['screenData']['newDelta'] == '':
|
||||
# its a cursor movement (experimental) - maybe also check current shortcut string?
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user