From c545ad6ddce366c30f1b42bb7d420849003c9959 Mon Sep 17 00:00:00 2001 From: DarkDefender Date: Thu, 30 May 2024 16:38:06 +0200 Subject: [PATCH] Disable keyrepeat for shortcuts Currently the keyboard shortcut actions gets repeated when holding down the shortcut keys. I don't think this is intentional as I didn't find any shortcuts that would benefit from this behavior. Besides just being a bit annoying, this could also lead to crashes as the program would get into an undefined state. For example if you held down the crop shortcut key (shift + c) and clicked outside of the crop hot zones, beeref would crash most of the time. --- beeref/actions/mixin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/beeref/actions/mixin.py b/beeref/actions/mixin.py index 622a3ae..c2de7dc 100644 --- a/beeref/actions/mixin.py +++ b/beeref/actions/mixin.py @@ -70,6 +70,7 @@ class ActionsMixin: def _create_actions(self): for action in actions.values(): qaction = QtGui.QAction(action.text, self) + qaction.setAutoRepeat(False) shortcuts = action.get_shortcuts() if shortcuts: qaction.setShortcuts(shortcuts)