diff --git a/config/keyboard/pty.conf b/config/keyboard/pty.conf index 989688de..02e7329e 100644 --- a/config/keyboard/pty.conf +++ b/config/keyboard/pty.conf @@ -4,7 +4,7 @@ 2,^[[1;5F=attribute_cursor #=toggle_has_attribute # escape - stop speech -^[=shut_up +^[=shut_up_pty # context menu key - stop speech ^[[29~=shut_up # alt+shift+down - review to bottom diff --git a/src/fenrirscreenreader/commands/commands/shut_up_pty.py b/src/fenrirscreenreader/commands/commands/shut_up_pty.py new file mode 100644 index 00000000..24b9372e --- /dev/null +++ b/src/fenrirscreenreader/commands/commands/shut_up_pty.py @@ -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