]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt/GuiSearch.cpp
GuiSearch: catch Esc
[features.git] / 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()) {