From 46fc7ed2189d77ec153cf53bbae1578f05d828f8 Mon Sep 17 00:00:00 2001 From: chrys Date: Sat, 23 Jul 2016 17:08:00 +0200 Subject: [PATCH] seperate onInput and onScreenUpdate incomming speech for prepare word echo and stuff --- .../commands/onInput/70000-speak_incomming.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/fenrir-package/commands/onInput/70000-speak_incomming.py diff --git a/src/fenrir-package/commands/onInput/70000-speak_incomming.py b/src/fenrir-package/commands/onInput/70000-speak_incomming.py new file mode 100644 index 00000000..60c5b33c --- /dev/null +++ b/src/fenrir-package/commands/onInput/70000-speak_incomming.py @@ -0,0 +1,21 @@ +#!/bin/python + +class command(): + def __init__(self): + pass + def run(self, environment): + if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'charEcho') and\ + environment['screenData']['newCursor']['x'] - environment['screenData']['oldCursor']['x'] == 1: + return environment + + ttyChanged = environment['screenData']['newTTY'] != environment['screenData']['oldTTY'] + if environment['screenData']['newDelta'] == environment['screenData']['oldDelta'] and \ + not ttyChanged: + return environment + + environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newDelta'], ttyChanged) + return environment + def setCallback(self, callback): + pass + def shutdown(self): + pass