add interrupt on keypress

This commit is contained in:
chrys 2016-08-06 04:47:41 +02:00
parent a2203361b3
commit e797d8dd97
3 changed files with 7 additions and 4 deletions

View File

@ -24,6 +24,7 @@ driver=linux
keyboardLayout=desktop
charEcho=False
wordEcho=False
interruptOnKeyPress=False
[general]
debugLevel=0

View File

@ -4,10 +4,11 @@ class command():
def __init__(self):
pass
def run(self, environment):
return environment
if environment['screenData']['newCursor'] == environment['screenData']['oldCursor'] and\
environment['screenData']['newDelta'] == environment['screenData']['oldDelta']:
return environment
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'interruptOnKeyPress'):
return environment
# if environment['screenData']['newCursor'] == environment['screenData']['oldCursor'] and\
# environment['screenData']['newDelta'] == environment['screenData']['oldDelta']:
# return environment
environment['runtime']['outputManager'].interruptOutput(environment)
return environment
def setCallback(self, callback):

View File

@ -34,5 +34,6 @@ settings = {
'keyboardLayout': "desktop",
'charEcho':False,
'wordEcho':True,
'interruptOnKeyPress': True,
}
}