add toggle spellcheck

This commit is contained in:
chrys 2016-09-05 22:05:40 +02:00
parent 74905144b5
commit 095ca33517
5 changed files with 23 additions and 3 deletions

View File

@ -22,8 +22,9 @@
1-FENRIR,1-KEY_F2=toggle_braille 1-FENRIR,1-KEY_F2=toggle_braille
1-FENRIR,1-KEY_F3=toggle_sound 1-FENRIR,1-KEY_F3=toggle_sound
1-FENRIR,1-KEY_F4=toggle_speech 1-FENRIR,1-KEY_F4=toggle_speech
#=toggle_auto_spell_check
#=toggle_output #=toggle_output
#=toggle_autoRead #=toggle_auto_read
1-FENRIR,1-KEY_Q=quit_fenrir 1-FENRIR,1-KEY_Q=quit_fenrir
1-FENRIR,1-KEY_T=time 1-FENRIR,1-KEY_T=time
1-FENRIR,1-KEY_D=date 1-FENRIR,1-KEY_D=date

View File

@ -22,8 +22,9 @@
1-KEY_CAPSLOCK,1-KEY_F2=toggle_braille 1-KEY_CAPSLOCK,1-KEY_F2=toggle_braille
1-KEY_CAPSLOCK,1-KEY_F3=toggle_sound 1-KEY_CAPSLOCK,1-KEY_F3=toggle_sound
1-KEY_CAPSLOCK,1-KEY_F4=toggle_speech 1-KEY_CAPSLOCK,1-KEY_F4=toggle_speech
#=toggle_auto_spell_check
#=toggle_output #=toggle_output
#=toggle_autoRead #=toggle_auto_read
#=quit_fenrir #=quit_fenrir
#=time #=time
#=date #=date

View File

@ -22,8 +22,9 @@
1-FENRIR,1-KEY_F2=toggle_braille 1-FENRIR,1-KEY_F2=toggle_braille
#1-FENRIR,1-KEY_F3=toggle_sound #1-FENRIR,1-KEY_F3=toggle_sound
1-FENRIR,1-KEY_F4=toggle_speech 1-FENRIR,1-KEY_F4=toggle_speech
#=toggle_auto_spell_check
#=toggle_output #=toggle_output
#=toggle_autoRead #=toggle_auto_read
#=quit_fenrir #=quit_fenrir
1-FENRIR,1-KEY_T=time 1-FENRIR,1-KEY_T=time
1-FENRIR,1-KEY_R=date 1-FENRIR,1-KEY_R=date

View File

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