diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index ab7a38309..09683578a 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -2189,6 +2189,13 @@ fonts.web.size.minimum_logical: maxval: maxint desc: Minimum logical font size (in pixels) that is applied when zooming out. +## reporter + +reporter.escape_quits: + type: Bool + default: True + desc: Allow escape to quit the crash reporter. + ## keybindings bindings.key_mappings: diff --git a/qutebrowser/misc/crashdialog.py b/qutebrowser/misc/crashdialog.py index 85fdf33bf..372657f7a 100644 --- a/qutebrowser/misc/crashdialog.py +++ b/qutebrowser/misc/crashdialog.py @@ -158,6 +158,11 @@ class _CrashDialog(QDialog): self._init_info_text() self._init_buttons() + # Prevent closing :report dialogs when pressing + def keyPressEvent(self, e): + if config.val.reporter.escape_quits or e.key() != Qt.Key_Escape: + super().keyPressEvent(e) + def __repr__(self): return utils.get_repr(self)