add shut_up_pty

This commit is contained in:
chrys 2018-07-17 00:25:21 +02:00
parent ee0c0a14ef
commit ae66a92db1
2 changed files with 25 additions and 1 deletions

View File

@ -4,7 +4,7 @@
2,^[[1;5F=attribute_cursor 2,^[[1;5F=attribute_cursor
#=toggle_has_attribute #=toggle_has_attribute
# escape - stop speech # escape - stop speech
^[=shut_up ^[=shut_up_pty
# context menu key - stop speech # context menu key - stop speech
^[[29~=shut_up ^[[29~=shut_up
# alt+shift+down - review to bottom # alt+shift+down - review to bottom

View File

@ -0,0 +1,24 @@
#!/bin/python
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
class command():
def __init__(self):
pass
def initialize(self, environment):
self.env = environment
def shutdown(self):
pass
def getDescription(self):
return _('interrupts the current presentation')
def run(self):
if len(self.env['input']['prevDeepestInput']) > len(self.env['input']['currInput']):
return
self.env['runtime']['outputManager'].interruptOutput()
self.env['runtime']['screenManager'].injectTextToScreen(b'\x1b')
def setCallback(self, callback):
pass