improve typing

This commit is contained in:
chrys 2016-08-28 17:45:16 +02:00
parent 621a6d4aa6
commit ed75db0c94
3 changed files with 5 additions and 5 deletions

View File

@ -69,7 +69,7 @@ charEcho=False
# echo deleted chars
charDeleteEcho=True
# echo word after pressing space
wordEcho=False
wordEcho=True
# interrupt speech on any keypress
interruptOnKeyPress=False

View File

@ -31,11 +31,11 @@ class command():
x, y, currWord = word_utils.getCurrentWord(environment['screenData']['newCursor']['x'], 0, newContent)
# was this a typed word?
if environment['screenData']['newDelta'] != '':
if not(newContent[environment['screenData']['oldCursor']['x']].strip(" \t\n") == '' and x != environment['screenData']['oldCursor']['x']):
if not(newContent[environment['screenData']['oldCursor']['x']].strip() == '' and x != environment['screenData']['oldCursor']['x']):
return environment
else:
# or just arrow arround?
if not(newContent[environment['screenData']['newCursor']['x']].strip(" \t\n") == '' and x != environment['screenData']['newCursor']['x']):
if not(newContent[environment['screenData']['newCursor']['x']].strip() == '' and x != environment['screenData']['newCursor']['x']):
return environment
if currWord != '':

View File

@ -13,8 +13,8 @@ class command():
if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:
return environment
# 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:
if abs(environment['screenData']['newCursor']['x'] - environment['screenData']['oldCursor']['x']) >= 1:
if len(environment['screenData']['newDelta']) <= 5:
return environment
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newDelta'], interrupt=False)