Skip to content

Commit

Permalink
Sleep a bit after pressing and releasing a key.
Browse files Browse the repository at this point in the history
The time values need some tweaking, but should prevent heavy javascript
apps from choking on fast input.
This fix will lead to bad performance, as it slows AutoKey down considerably. (Maybe factor 100?)
This needs a proper fix, like a user-configurable blacklist of bad applications, and
only slow down for those applications.

(Link commit with github issue: autokey#151)
  • Loading branch information
luziferius committed Sep 14, 2018
1 parent c7b06f9 commit 0144979
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/autokey/interface.py
Expand Up @@ -967,7 +967,9 @@ def __sendKeyCode(self, keyCode, modifiers=0, theWindow=None):
if cm.ConfigManager.SETTINGS[cm.ENABLE_QT4_WORKAROUND] or self.__enableQT4Workaround:
self.__doQT4Workaround(keyCode)
self.__sendKeyPressEvent(keyCode, modifiers, theWindow)
time.sleep(0.01)
self.__sendKeyReleaseEvent(keyCode, modifiers, theWindow)
time.sleep(0.01)

def __checkWorkaroundNeeded(self):
focus = self.localDisplay.get_input_focus().focus
Expand Down

0 comments on commit 0144979

Please sign in to comment.