diff --git a/src/calibre/gui2/tweak_book/editor/text.py b/src/calibre/gui2/tweak_book/editor/text.py index 24bea37bce..da0ea747f8 100644 --- a/src/calibre/gui2/tweak_book/editor/text.py +++ b/src/calibre/gui2/tweak_book/editor/text.py @@ -660,6 +660,10 @@ class TextEdit(PlainTextEdit): if self.replace_possible_unicode_sequence(): ev.accept() return + if ev.key() == Qt.Key_Insert: + self.setOverwriteMode(self.overwriteMode() ^ True) + ev.accept() + return QPlainTextEdit.keyPressEvent(self, ev) if (ev.key() == Qt.Key_Semicolon or ';' in unicode(ev.text())) and tprefs['replace_entities_as_typed'] and self.syntax == 'html': self.replace_possible_entity()