From 7d0eb6dd39ff08c51b1cb117909280b019187b1e Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 7 Jul 2016 23:34:19 +1000 Subject: [PATCH] ignore copy/paste shortcuts except on mac --- aqt/webview.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aqt/webview.py b/aqt/webview.py index 33285f244..e8f5b3c4f 100644 --- a/aqt/webview.py +++ b/aqt/webview.py @@ -82,13 +82,13 @@ class AnkiWebView(QWebEngineView): def eventFilter(self, obj, evt): if not isinstance(evt, QKeyEvent) or obj != self: return False - if evt.matches(QKeySequence.Copy): + if evt.matches(QKeySequence.Copy) and isMac: self.onCopy() return True - if evt.matches(QKeySequence.Cut): + if evt.matches(QKeySequence.Cut) and isMac: self.onCut() return True - if evt.matches(QKeySequence.Paste): + if evt.matches(QKeySequence.Paste) and isMac: self.onPaste() return True if evt.key() == Qt.Key_Escape: