select all shortcut in fields

This commit is contained in:
Damien Elmes 2016-07-14 11:56:18 +10:00
parent 5655448919
commit 37bac3979c

View file

@ -91,6 +91,9 @@ class AnkiWebView(QWebEngineView):
if evt.matches(QKeySequence.Paste) and isMac:
self.onPaste()
return True
if evt.matches(QKeySequence.SelectAll):
self.triggerPageAction(QWebEnginePage.SelectAll)
return False
if evt.key() == Qt.Key_Escape:
# cheap hack to work around webengine swallowing escape key that
# usually closes dialogs