diff --git a/src/fenrirscreenreader/core/inputManager.py b/src/fenrirscreenreader/core/inputManager.py index 0fcd75c7..eb379607 100644 --- a/src/fenrirscreenreader/core/inputManager.py +++ b/src/fenrirscreenreader/core/inputManager.py @@ -51,10 +51,13 @@ class inputManager(): self.executeDeviceGrab = newExecuteDeviceGrab def handleDeviceGrab(self): if not self.executeDeviceGrab: + print('1') return if self.env['input']['eventBuffer'] != []: + print('2', self.env['input']['eventBuffer']) return if not self.noKeyPressed(): + print('3') return if not self.env['runtime']['settingsManager'].getSettingAsBool('keyboard', 'grabDevices'): self.executeDeviceGrab = False @@ -166,7 +169,7 @@ class inputManager(): return True def handlePlugInputDevice(self, eventData): for deviceEntry in eventData: - self.env['runtime']['inputManager'].updateInputDevices(deviceEntry['device']) + self.updateInputDevices(deviceEntry['device']) def updateInputDevices(self, newDevice = None): try: self.env['runtime']['inputDriver'].updateInputDevices(newDevice) diff --git a/src/fenrirscreenreader/core/settingsManager.py b/src/fenrirscreenreader/core/settingsManager.py index 988503eb..48238ccc 100644 --- a/src/fenrirscreenreader/core/settingsManager.py +++ b/src/fenrirscreenreader/core/settingsManager.py @@ -417,6 +417,11 @@ class settingsManager(): environment['runtime']['vmenuManager'].initialize(environment) environment['runtime']['quickMenuManager'] = quickMenuManager.quickMenuManager() environment['runtime']['quickMenuManager'].initialize(environment) + # only possible after having input and screen managers with clean buffer + environment['runtime']['inputManager'].setExecuteDeviceGrab() + environment['runtime']['inputManager'].writeEventBuffer() + environment['runtime']['inputManager'].handleDeviceGrab() + environment['runtime']['debug'].writeDebugOut('\/-------environment-------\/',debug.debugLevel.INFO, onAnyLevel=True) environment['runtime']['debug'].writeDebugOut(str(environment), debug.debugLevel.INFO, onAnyLevel=True) environment['runtime']['debug'].writeDebugOut('\/-------settings.conf-------\/', debug.debugLevel.INFO, onAnyLevel=True)