diff --git a/plugin-fancymenu/lxqtfancymenuwindow.cpp b/plugin-fancymenu/lxqtfancymenuwindow.cpp index b943d5241..68fee4110 100644 --- a/plugin-fancymenu/lxqtfancymenuwindow.cpp +++ b/plugin-fancymenu/lxqtfancymenuwindow.cpp @@ -432,8 +432,23 @@ bool LXQtFancyMenuWindow::eventFilter(QObject *watched, QEvent *e) || watched == mCategoryView->viewport() || watched == mAppView->viewport())) { + /* Basically we take all keyboard events sent to: + * + * - Search QLineEdit + * - App QListView's viewport() + * - Category QListView's viewport() + * + * And we manually redirect them to the selected one. + * Then event gets eaten up so it doesn't get processed + * by it's original destination widget. + * + * If selected item is same as destination widget, no + * redirection happens, we call default event filter + * to let Qt manage it's internal state. + */ + QKeyEvent *ev = static_cast(e); - if(ev->key() == Qt::Key_Return) + if(ev->key() == Qt::Key_Return || ev->key() == Qt::Key_Enter) { activateCurrentApp(); return true;