add initial capslock announcement

This commit is contained in:
chrys 2016-09-28 22:53:20 +02:00
parent 4ca5e90909
commit 3e1e96a701

View File

@ -0,0 +1,27 @@
#!/bin/python
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return 'No description found'
def run(self):
if self.env['input']['oldCapsLock'] == self.env['input']['newCapsLock']:
return
if self.env['input']['newCapsLock']:
self.env['runtime']['outputManager'].presentText("Capslock on", interrupt=False)
else:
self.env['runtime']['outputManager'].presentText("Capslock off", interrupt=False)
def setCallback(self, callback):
pass