add toggle_autoread, typo

This commit is contained in:
chrys 2016-08-08 11:15:47 +02:00
parent f51a5967eb
commit 629fa3576c
6 changed files with 22 additions and 4 deletions

View File

@ -10,7 +10,8 @@
1-KEY_KP1=prev_char
1-KEY_KP3=next_char
1-KEY_KPDOT=exit_review
1-KEY_KP0,1-KEY_F2=toggle_braille_enable
1-KEY_KP0,1-KEY_F3=toggle_sound_enable
1-KEY_KP0,1-KEY_F4=toggle_speech_enable
#=toggle_output_enable
1-KEY_KP0,1-KEY_F2=toggle_braille
1-KEY_KP0,1-KEY_F3=toggle_sound
1-KEY_KP0,1-KEY_F4=toggle_speech
#=toggle_output
#=toggle_autoRead

View File

@ -0,0 +1,17 @@
#!/bin/python
class command():
def __init__(self):
pass
def run(self, environment):
environment = environment['runtime']['settingsManager'].setSetting(environment, 'speech', 'autoReadIncomming', str(not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'autoReadIncomming')))
if environment['runtime']['settingsManager'].getSettingAsBool(environment, 'speech', 'autoReadIncomming'):
environment['runtime']['outputManager'].presentText(environment, "autoread enabled",soundIconName='', interrupt=True)
else:
environment['runtime']['outputManager'].presentText(environment, "autoread disabled",soundIconName='', interrupt=True)
return environment
def setCallback(self, callback):
pass
def shutdown(self):
pass