mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 23:33:47 +02:00
Edit Book: Allow putting the editor into replace mode by pressing the Insert key
This commit is contained in:
parent
f337a57435
commit
e4024b8b05
1 changed files with 4 additions and 0 deletions
|
|
@ -660,6 +660,10 @@ def keyPressEvent(self, ev):
|
|||
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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue