diff --git a/src/calibre/gui2/comments_editor.py b/src/calibre/gui2/comments_editor.py index 97a218a10b..1a6b60284b 100644 --- a/src/calibre/gui2/comments_editor.py +++ b/src/calibre/gui2/comments_editor.py @@ -259,6 +259,19 @@ class EditorWidget(QWebView): # {{{ return property(fget=fget, fset=fset) + def keyPressEvent(self, ev): + if ev.key() in (Qt.Key_Tab, Qt.Key_Escape, Qt.Key_Backtab): + ev.ignore() + else: + return QWebView.keyPressed(self, ev) + + def keyReleaseEvent(self, ev): + if ev.key() in (Qt.Key_Tab, Qt.Key_Escape, Qt.Key_Backtab): + ev.ignore() + else: + return QWebView.keyReleased(self, ev) + + # }}} # Highlighter {{{