fix grab ungrab while input
This commit is contained in:
parent
8bed7ce8e2
commit
28f29154cb
@ -45,7 +45,7 @@ fenrirMaxRate=890
|
|||||||
|
|
||||||
[braille]
|
[braille]
|
||||||
enabled=True
|
enabled=True
|
||||||
driver=brlttyDriver
|
driver=dummyDriver
|
||||||
#layout=en
|
#layout=en
|
||||||
# to what should the flush timeout relate to
|
# to what should the flush timeout relate to
|
||||||
# word = flush after (number of words to display) * seconds
|
# word = flush after (number of words to display) * seconds
|
||||||
|
@ -83,6 +83,7 @@ class fenrirManager():
|
|||||||
else:
|
else:
|
||||||
self.environment['runtime']['inputManager'].writeEventBuffer()
|
self.environment['runtime']['inputManager'].writeEventBuffer()
|
||||||
if self.environment['runtime']['inputManager'].noKeyPressed():
|
if self.environment['runtime']['inputManager'].noKeyPressed():
|
||||||
|
self.environment['runtime']['inputManager'].handleDeviceGrab()
|
||||||
self.modifierInput = False
|
self.modifierInput = False
|
||||||
self.singleKeyCommand = False
|
self.singleKeyCommand = False
|
||||||
if self.environment['input']['keyForeward'] > 0:
|
if self.environment['input']['keyForeward'] > 0:
|
||||||
@ -127,7 +128,7 @@ class fenrirManager():
|
|||||||
self.environment['runtime']['commandManager'].executeSwitchTrigger('onSwitchApplicationProfile', \
|
self.environment['runtime']['commandManager'].executeSwitchTrigger('onSwitchApplicationProfile', \
|
||||||
self.environment['runtime']['applicationManager'].getPrevApplication(), \
|
self.environment['runtime']['applicationManager'].getPrevApplication(), \
|
||||||
self.environment['runtime']['applicationManager'].getCurrentApplication())
|
self.environment['runtime']['applicationManager'].getCurrentApplication())
|
||||||
'''
|
'''
|
||||||
if self.environment['runtime']['vmenuManager'].getActive():
|
if self.environment['runtime']['vmenuManager'].getActive():
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -166,7 +167,7 @@ class fenrirManager():
|
|||||||
#self.environment['runtime']['outputManager'].brailleText(flush=False)
|
#self.environment['runtime']['outputManager'].brailleText(flush=False)
|
||||||
|
|
||||||
|
|
||||||
def detectShortcutCommand(self):
|
def detectShortcutCommand(self):
|
||||||
if self.environment['input']['keyForeward'] > 0:
|
if self.environment['input']['keyForeward'] > 0:
|
||||||
return
|
return
|
||||||
if self.environment['runtime']['inputManager'].isKeyPress():
|
if self.environment['runtime']['inputManager'].isKeyPress():
|
||||||
@ -177,7 +178,7 @@ class fenrirManager():
|
|||||||
self.singleKeyCommand = len( self.environment['runtime']['inputManager'].getLastDeepestInput() ) == 1
|
self.singleKeyCommand = len( self.environment['runtime']['inputManager'].getLastDeepestInput() ) == 1
|
||||||
# key is already released. we need the old one
|
# key is already released. we need the old one
|
||||||
if not( self.singleKeyCommand and self.environment['runtime']['inputManager'].noKeyPressed()):
|
if not( self.singleKeyCommand and self.environment['runtime']['inputManager'].noKeyPressed()):
|
||||||
shortcut = self.environment['runtime']['inputManager'].getCurrShortcut()
|
shortcut = self.environment['runtime']['inputManager'].getCurrShortcut()
|
||||||
self.command = self.environment['runtime']['inputManager'].getCommandForShortcut(shortcut)
|
self.command = self.environment['runtime']['inputManager'].getCommandForShortcut(shortcut)
|
||||||
|
|
||||||
if not self.modifierInput:
|
if not self.modifierInput:
|
||||||
|
@ -59,7 +59,6 @@ class inputManager():
|
|||||||
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'grabDevices'):
|
if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'grabDevices'):
|
||||||
self.executeDeviceGrab = False
|
self.executeDeviceGrab = False
|
||||||
return
|
return
|
||||||
print(self.env['runtime']['screenManager'].getCurrScreenIgnored())
|
|
||||||
if self.env['runtime']['screenManager'].getCurrScreenIgnored():
|
if self.env['runtime']['screenManager'].getCurrScreenIgnored():
|
||||||
while not self.ungrabAllDevices():
|
while not self.ungrabAllDevices():
|
||||||
time.sleep(0.2)
|
time.sleep(0.2)
|
||||||
@ -140,7 +139,6 @@ class inputManager():
|
|||||||
self.env['runtime']['debug'].writeDebugOut("currInput " + str(self.env['input']['currInput'] ) ,debug.debugLevel.INFO)
|
self.env['runtime']['debug'].writeDebugOut("currInput " + str(self.env['input']['currInput'] ) ,debug.debugLevel.INFO)
|
||||||
if self.noKeyPressed():
|
if self.noKeyPressed():
|
||||||
self.env['input']['prevInput'] = []
|
self.env['input']['prevInput'] = []
|
||||||
self.handleDeviceGrab()
|
|
||||||
|
|
||||||
def handleLedStates(self, mEvent):
|
def handleLedStates(self, mEvent):
|
||||||
try:
|
try:
|
||||||
@ -171,7 +169,7 @@ class inputManager():
|
|||||||
self.env['runtime']['inputManager'].updateInputDevices(deviceEntry['device'])
|
self.env['runtime']['inputManager'].updateInputDevices(deviceEntry['device'])
|
||||||
def updateInputDevices(self, newDevice = None):
|
def updateInputDevices(self, newDevice = None):
|
||||||
try:
|
try:
|
||||||
self.env['runtime']['inputDriver'].updateInputDevices(newDevice)
|
self.env['runtime']['inputDriver'].updateInputDevices(newDevice)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
self.setExecuteDeviceGrab()
|
self.setExecuteDeviceGrab()
|
||||||
|
@ -159,6 +159,8 @@ class remoteManager():
|
|||||||
def setSettings(self, settingsArgs):
|
def setSettings(self, settingsArgs):
|
||||||
self.env['runtime']['settingsManager'].parseSettingArgs(settingsArgs)
|
self.env['runtime']['settingsManager'].parseSettingArgs(settingsArgs)
|
||||||
self.env['runtime']['screenManager'].updateScreenIgnored()
|
self.env['runtime']['screenManager'].updateScreenIgnored()
|
||||||
|
self.env['runtime']['inputManager'].setExecuteDeviceGrab()
|
||||||
|
self.env['runtime']['inputManager'].handleDeviceGrab()
|
||||||
def handleRemoteIncomming(self, eventData):
|
def handleRemoteIncomming(self, eventData):
|
||||||
if not eventData:
|
if not eventData:
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user