don't repeat shortcuts when key held down

https://anki.tenderapp.com/discussions/ankidesktop/29405-space-bar-repeat-problem
This commit is contained in:
Damien Elmes 2018-08-29 10:07:33 +10:00
parent daf8d2607a
commit df280783b3

View file

@ -718,7 +718,9 @@ title="%s" %s>%s</button>''' % (
def applyShortcuts(self, shortcuts):
qshortcuts = []
for key, fn in shortcuts:
qshortcuts.append(QShortcut(QKeySequence(key), self, activated=fn))
scut = QShortcut(QKeySequence(key), self, activated=fn)
scut.setAutoRepeat(False)
qshortcuts.append(scut)
return qshortcuts
def setStateShortcuts(self, shortcuts):