filter out unneeded events, improve interrupt commands

This commit is contained in:
chrys
2016-09-29 22:34:44 +02:00
parent 40b257f4e7
commit 8bedf94073
4 changed files with 12 additions and 5 deletions

View File

@ -16,6 +16,8 @@ class command():
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()
def setCallback(self, callback):
pass

View File

@ -19,6 +19,8 @@ class command():
def run(self):
if self.env['runtime']['inputManager'].noKeyPressed():
return
if len(self.env['input']['prevDeepestInput']) > len(self.env['input']['currInput']):
return
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'interruptOnKeyPress'):
return
if self.env['screenData']['newTTY'] != self.env['screenData']['oldTTY']: