initial keyboard grab
This commit is contained in:
@ -4,12 +4,11 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
return environment
|
||||
pass
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
pass
|
||||
def getDescription(self, environment):
|
||||
return 'interrupts the current presentation'
|
||||
|
||||
def run(self, environment):
|
||||
environment['runtime']['outputManager'].interruptOutput(environment)
|
||||
def setCallback(self, callback):
|
||||
|
@ -4,23 +4,23 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
return environment
|
||||
pass
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
pass
|
||||
def getDescription(self, environment):
|
||||
return ''
|
||||
|
||||
def run(self, environment):
|
||||
if not environment['runtime']['settingsManager'].getSettingAsBool(environment, 'keyboard', 'interruptOnKeyPress'):
|
||||
return environment
|
||||
return
|
||||
if environment['runtime']['inputManager'].noKeyPressed(environment):
|
||||
return
|
||||
if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:
|
||||
return environment
|
||||
return
|
||||
# if environment['screenData']['newCursor'] == environment['screenData']['oldCursor'] and\
|
||||
# environment['screenData']['newDelta'] == environment['screenData']['oldDelta']:
|
||||
# return environment
|
||||
if environment['input']['currShortcut'] != '':
|
||||
return environment
|
||||
environment['runtime']['outputManager'].interruptOutput(environment)
|
||||
return environment
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
@ -4,33 +4,34 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
return environment
|
||||
pass
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
pass
|
||||
def getDescription(self, environment):
|
||||
return ''
|
||||
|
||||
def run(self, environment):
|
||||
# TTY Change
|
||||
if environment['screenData']['newTTY'] != environment['screenData']['oldTTY']:
|
||||
return environment
|
||||
return
|
||||
if environment['runtime']['inputManager'].noKeyPressed(environment):
|
||||
return
|
||||
# detect an change on the screen, we just want to cursor arround, so no change should appear
|
||||
if environment['screenData']['newDelta'] != '':
|
||||
return environment
|
||||
return
|
||||
if environment['screenData']['newNegativeDelta'] != '':
|
||||
return environment
|
||||
return
|
||||
# is it a horizontal change?
|
||||
if environment['screenData']['newCursor']['y'] != environment['screenData']['oldCursor']['y'] or\
|
||||
environment['screenData']['newCursor']['x'] == environment['screenData']['oldCursor']['x']:
|
||||
return environment
|
||||
|
||||
return
|
||||
print('drin')
|
||||
if environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']][environment['screenData']['newCursor']['x']].strip() == '':
|
||||
pass
|
||||
#environment['runtime']['outputManager'].presentText(environment, "blank",True)
|
||||
else:
|
||||
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']][environment['screenData']['newCursor']['x']],interrupt=True)
|
||||
|
||||
return environment
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
@ -4,9 +4,9 @@ class command():
|
||||
def __init__(self):
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
return environment
|
||||
pass
|
||||
def shutdown(self, environment):
|
||||
return environment
|
||||
pass
|
||||
def getDescription(self, environment):
|
||||
return ''
|
||||
|
||||
@ -21,8 +21,7 @@ class command():
|
||||
environment['runtime']['outputManager'].presentText(environment, "blank", soundIcon='EmptyLine', interrupt=True)
|
||||
else:
|
||||
environment['runtime']['outputManager'].presentText(environment, environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']], True)
|
||||
|
||||
return environment
|
||||
|
||||
def setCallback(self, callback):
|
||||
pass
|
||||
|
||||
|
Reference in New Issue
Block a user