add intial toggle module commands

This commit is contained in:
chrys 2016-07-23 13:35:14 +02:00
parent 525cd14053
commit e0aab47919
4 changed files with 49 additions and 1 deletions

View File

@ -17,7 +17,7 @@ volume=200
enabled=False
layout=en
['screen]
[screen]
driver=linux
[keyboard]

View File

@ -0,0 +1,16 @@
#!/bin/python
class command():
def __init__(self):
pass
def run(self, environment):
environment['braille']['enabled'] = not environment['braille']['enabled']
if environment['braille']['enabled']:
environment['runtime']['outputManager'].presentText(environment, "braille enabled")
else:
environment['runtime']['outputManager'].presentText(environment, "braille disabled")
return environment
def setCallback(self, callback):
pass
def shutdown(self):
pass

View File

@ -0,0 +1,16 @@
#!/bin/python
class command():
def __init__(self):
pass
def run(self, environment):
environment['sound']['enabled'] = not environment['sound']['enabled']
if environment['sound']['enabled']:
environment['runtime']['outputManager'].presentText(environment, "sound enabled")
else:
environment['runtime']['outputManager'].presentText(environment, "sound disabled")
return environment
def setCallback(self, callback):
pass
def shutdown(self):
pass

View File

@ -0,0 +1,16 @@
#!/bin/python
class command():
def __init__(self):
pass
def run(self, environment):
environment['speech']['enabled'] = not environment['speech']['enabled']
if environment['speech']['enabled']:
environment['runtime']['outputManager'].presentText(environment, "speech enabled")
else:
environment['runtime']['outputManager'].presentText(environment, "speech disabled")
return environment
def setCallback(self, callback):
pass
def shutdown(self):
pass