[LyX/master] Make Alt-escape work for search as well

Richard Kimberly Heck rikiheck at lyx.org
Wed Jul 26 19:39:03 UTC 2023


commit 2224e85030eb745503dd3b51cd40eaadbdb3a0db
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date:   Wed Jul 26 16:52:17 2023 -0400

    Make Alt-escape work for search as well
---
 src/frontends/qt/GuiSearch.cpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt/GuiSearch.cpp b/src/frontends/qt/GuiSearch.cpp
index b824bfe..41900d1 100644
--- a/src/frontends/qt/GuiSearch.cpp
+++ b/src/frontends/qt/GuiSearch.cpp
@@ -148,6 +148,12 @@ void GuiSearchWidget::keyPressEvent(QKeyEvent * ev)
 		return;
 	}
 	if (ev->key() == Qt::Key_Escape) {
+		Qt::KeyboardModifiers mod = ev->modifiers();
+		if (mod & Qt::AltModifier) {
+			QWidget::keyPressEvent(ev);
+			return;
+		}
+
 		dispatch(FuncRequest(LFUN_DIALOG_HIDE, "findreplace"));
 		view_.setFocus();
 		bv_->buffer().updateBuffer();


More information about the lyx-cvs mailing list