diff --git a/config/keyboard/desktop.conf b/config/keyboard/desktop.conf index bfcb0fd2..17797911 100644 --- a/config/keyboard/desktop.conf +++ b/config/keyboard/desktop.conf @@ -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 diff --git a/src/fenrir-package/commands/commands/toggle_autoRead.py b/src/fenrir-package/commands/commands/toggle_autoRead.py new file mode 100644 index 00000000..4c1611f0 --- /dev/null +++ b/src/fenrir-package/commands/commands/toggle_autoRead.py @@ -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 diff --git a/src/fenrir-package/commands/commands/toggle_braille_enable.py b/src/fenrir-package/commands/commands/toggle_braille.py similarity index 100% rename from src/fenrir-package/commands/commands/toggle_braille_enable.py rename to src/fenrir-package/commands/commands/toggle_braille.py diff --git a/src/fenrir-package/commands/commands/toggle_output_enable.py b/src/fenrir-package/commands/commands/toggle_output.py similarity index 100% rename from src/fenrir-package/commands/commands/toggle_output_enable.py rename to src/fenrir-package/commands/commands/toggle_output.py diff --git a/src/fenrir-package/commands/commands/toggle_sound_enable.py b/src/fenrir-package/commands/commands/toggle_sound.py similarity index 100% rename from src/fenrir-package/commands/commands/toggle_sound_enable.py rename to src/fenrir-package/commands/commands/toggle_sound.py diff --git a/src/fenrir-package/commands/commands/toggle_speech_enable.py b/src/fenrir-package/commands/commands/toggle_speech.py similarity index 100% rename from src/fenrir-package/commands/commands/toggle_speech_enable.py rename to src/fenrir-package/commands/commands/toggle_speech.py