add last_incomming and improve other commands

This commit is contained in:
chrys 2016-08-10 17:54:02 +02:00
parent 7b4be74688
commit dec9f7a621
3 changed files with 21 additions and 2 deletions

View File

@ -1,5 +1,5 @@
1-KEY_KP0=fenrirKey
1-KEY_LEFTCTRL=shut_up
#1-KEY_LEFTCTRL=shut_up
1-KEY_RIGHTCTRL=shut_up
1-KEY_KP8=curr_line
1-KEY_KP7=prev_line
@ -12,6 +12,7 @@
1-KEY_KP3=next_char
1-KEY_KPDOT=exit_review
#=curr_screen
#=last_incomming
1-KEY_KP0,1-KEY_F2=toggle_braille
1-KEY_KP0,1-KEY_F3=toggle_sound
1-KEY_KP0,1-KEY_F4=toggle_speech

View File

@ -4,7 +4,10 @@ class command():
def __init__(self):
pass
def run(self, environment):
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newContentText'],interrupt=True)
if environment['screenData']['newContentText'].strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank", interrupt=True)
else:
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newContentText'],interrupt=True)
return environment
def setCallback(self, callback):
pass

View File

@ -0,0 +1,15 @@
#!/bin/python
class command():
def __init__(self):
pass
def run(self, environment):
if environment['screenData']['newDelta'].strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank", interrupt=True)
else:
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newDelta'], interrupt=True)
return environment
def setCallback(self, callback):
pass
def shutdown(self):
pass