Update 15000-char_echo.py

This commit is contained in:
chrys 2019-08-23 10:06:29 +02:00 committed by GitHub
parent 4444a90aa2
commit c7f62cd1ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,11 +17,12 @@ class command():
return 'No Description found' return 'No Description found'
def run(self): def run(self):
# enabled?
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charEcho'):
return
# big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now) # big changes are no char (but the value is bigger than one maybe the differ needs longer than you can type, so a little strange random buffer for now)
xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x']) xMove = abs(self.env['screen']['newCursor']['x'] - self.env['screen']['oldCursor']['x'])
if xMove > 1: if xMove > 2:
return
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'charEcho'):
return return
# detect deletion or chilling # detect deletion or chilling
if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']: if self.env['screen']['newCursor']['x'] <= self.env['screen']['oldCursor']['x']: