mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
comments editor: Pass through Esc key
This commit is contained in:
parent
a323051dcd
commit
459529d11b
@ -259,6 +259,19 @@ class EditorWidget(QWebView): # {{{
|
|||||||
|
|
||||||
return property(fget=fget, fset=fset)
|
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 {{{
|
# Highlighter {{{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user