From 8f76457feb9c30f134e2fbeb1a903b2deae41648 Mon Sep 17 00:00:00 2001 From: chrys Date: Thu, 22 Mar 2018 21:01:38 +0100 Subject: [PATCH] fix first shortcut is not handled --- src/fenrirscreenreader/core/fenrirManager.py | 2 ++ src/fenrirscreenreader/core/inputManager.py | 1 + 2 files changed, 3 insertions(+) diff --git a/src/fenrirscreenreader/core/fenrirManager.py b/src/fenrirscreenreader/core/fenrirManager.py index 1b0abc44..84f4a0e7 100644 --- a/src/fenrirscreenreader/core/fenrirManager.py +++ b/src/fenrirscreenreader/core/fenrirManager.py @@ -58,6 +58,7 @@ class fenrirManager(): self.environment['runtime']['inputManager'].handleInputEvent(event['Data']) else: return + if self.environment['runtime']['inputManager'].noKeyPressed(): self.environment['runtime']['inputManager'].clearLastDeepInput() if self.environment['runtime']['screenManager'].isSuspendingScreen(): @@ -144,6 +145,7 @@ class fenrirManager(): if not( self.singleKeyCommand and self.environment['runtime']['inputManager'].noKeyPressed()): shortcut = self.environment['runtime']['inputManager'].getCurrShortcut() self.command = self.environment['runtime']['inputManager'].getCommandForShortcut(shortcut) + if not self.modifierInput: if self.environment['runtime']['inputManager'].isKeyPress(): if self.command != '': diff --git a/src/fenrirscreenreader/core/inputManager.py b/src/fenrirscreenreader/core/inputManager.py index d08280d8..d56a2dd6 100644 --- a/src/fenrirscreenreader/core/inputManager.py +++ b/src/fenrirscreenreader/core/inputManager.py @@ -23,6 +23,7 @@ class inputManager(): self.env['input']['newScrollLock'] = self.env['runtime']['inputDriver'].getLedState(2) self.env['input']['oldScrollLock'] = self.env['input']['newScrollLock'] self.lastDeepestInput = [] + self.env['input']['shortcutRepeat'] = 1 self.lastInputTime = time.time() def shutdown(self): self.removeAllDevices()