add initial capslock announcement
This commit is contained in:
parent
4ca5e90909
commit
3e1e96a701
27
src/fenrir-package/commands/onInput/80000-capslock.py
Normal file
27
src/fenrir-package/commands/onInput/80000-capslock.py
Normal 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
|
Loading…
Reference in New Issue
Block a user