diff --git a/config/keyboard/desktop.conf b/config/keyboard/desktop.conf index aca358b7..602a228b 100644 --- a/config/keyboard/desktop.conf +++ b/config/keyboard/desktop.conf @@ -22,8 +22,9 @@ 1-FENRIR,1-KEY_F2=toggle_braille 1-FENRIR,1-KEY_F3=toggle_sound 1-FENRIR,1-KEY_F4=toggle_speech +#=toggle_auto_spell_check #=toggle_output -#=toggle_autoRead +#=toggle_auto_read 1-FENRIR,1-KEY_Q=quit_fenrir 1-FENRIR,1-KEY_T=time 1-FENRIR,1-KEY_D=date diff --git a/config/keyboard/laptop.conf b/config/keyboard/laptop.conf index 26a57dc1..623868b1 100644 --- a/config/keyboard/laptop.conf +++ b/config/keyboard/laptop.conf @@ -22,8 +22,9 @@ 1-KEY_CAPSLOCK,1-KEY_F2=toggle_braille 1-KEY_CAPSLOCK,1-KEY_F3=toggle_sound 1-KEY_CAPSLOCK,1-KEY_F4=toggle_speech +#=toggle_auto_spell_check #=toggle_output -#=toggle_autoRead +#=toggle_auto_read #=quit_fenrir #=time #=date diff --git a/config/keyboard/test.conf b/config/keyboard/test.conf index 52e9eb7a..6f34de67 100644 --- a/config/keyboard/test.conf +++ b/config/keyboard/test.conf @@ -22,8 +22,9 @@ 1-FENRIR,1-KEY_F2=toggle_braille #1-FENRIR,1-KEY_F3=toggle_sound 1-FENRIR,1-KEY_F4=toggle_speech +#=toggle_auto_spell_check #=toggle_output -#=toggle_autoRead +#=toggle_auto_read #=quit_fenrir 1-FENRIR,1-KEY_T=time 1-FENRIR,1-KEY_R=date diff --git a/src/fenrir-package/commands/commands/toggle_autoRead.py b/src/fenrir-package/commands/commands/toggle_auto_read.py similarity index 100% rename from src/fenrir-package/commands/commands/toggle_autoRead.py rename to src/fenrir-package/commands/commands/toggle_auto_read.py diff --git a/src/fenrir-package/commands/commands/toggle_auto_spell_check.py b/src/fenrir-package/commands/commands/toggle_auto_spell_check.py new file mode 100644 index 00000000..35ad8e79 --- /dev/null +++ b/src/fenrir-package/commands/commands/toggle_auto_spell_check.py @@ -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