]> git.lyx.org Git - lyx.git/commitdiff
GuiSearch: catch Esc
authorJuergen Spitzmueller <spitz@lyx.org>
Mon, 15 Feb 2021 14:37:13 +0000 (15:37 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Mon, 15 Feb 2021 14:37:58 +0000 (15:37 +0100)
src/frontends/qt/GuiSearch.cpp

index 1658804cd1d0930c87431649cf0472b809c21a72..ee83692274d94af40d1d9cfac4f964db33fc385c 100644 (file)
@@ -101,6 +101,10 @@ void GuiSearchWidget::keyPressEvent(QKeyEvent * ev)
                findClicked(ev->modifiers() == Qt::ShiftModifier);
                return;
        }
+       if (ev->key() == Qt::Key_Escape) {
+               dispatch(FuncRequest(LFUN_DIALOG_TOGGLE, "findreplace"));
+               return;
+       }
 
        // we catch the key sequences for forward and backwards search
        if (sym.isOK()) {