diff --git a/qt/aqt/editor.py b/qt/aqt/editor.py index c2e6f8799..7766dd9e8 100644 --- a/qt/aqt/editor.py +++ b/qt/aqt/editor.py @@ -1052,7 +1052,7 @@ $editorToolbar.then(({{ toolbar }}) => toolbar.appendGroup({{ class EditorWebView(AnkiWebView): def __init__(self, parent: QWidget, editor: Editor) -> None: - AnkiWebView.__init__(self, title="editor", mac_default_shortcuts=False) + AnkiWebView.__init__(self, title="editor") self.editor = editor self.setAcceptDrops(True) self._markInternal = False diff --git a/qt/aqt/webview.py b/qt/aqt/webview.py index aec378c2c..a5be5e21c 100644 --- a/qt/aqt/webview.py +++ b/qt/aqt/webview.py @@ -213,8 +213,6 @@ class AnkiWebView(QWebEngineView): self, parent: Optional[QWidget] = None, title: str = "default", - *, - mac_default_shortcuts: bool = True, ) -> None: QWebEngineView.__init__(self, parent=parent) self.set_title(title) @@ -242,23 +240,6 @@ class AnkiWebView(QWebEngineView): context=Qt.WidgetWithChildrenShortcut, activated=self.onEsc, ) - if isMac and mac_default_shortcuts: - for key, fn in [ - (QKeySequence.Copy, self.onCopy), - (QKeySequence.Paste, self.onPaste), - (QKeySequence.Cut, self.onCut), - (QKeySequence.SelectAll, self.onSelectAll), - ]: - QShortcut( # type: ignore - key, self, context=Qt.WidgetWithChildrenShortcut, activated=fn - ) - - QShortcut( # type: ignore - QKeySequence("ctrl+shift+v"), - self, - context=Qt.WidgetWithChildrenShortcut, - activated=self.onPaste, - ) def set_title(self, title: str) -> None: self.title = title # type: ignore[assignment]