diff --git a/src/lib/bookmarks/bookmarkstreeview.cpp b/src/lib/bookmarks/bookmarkstreeview.cpp index 07018a3ed..6f2dd58df 100644 --- a/src/lib/bookmarks/bookmarkstreeview.cpp +++ b/src/lib/bookmarks/bookmarkstreeview.cpp @@ -268,13 +268,13 @@ void BookmarksTreeView::keyPressEvent(QKeyEvent* event) switch (event->key()) { case Qt::Key_Return: case Qt::Key_Enter: - if (item->isFolder() && event->modifiers() == Qt::NoModifier) { + if (item->isFolder() && (event->modifiers() == Qt::NoModifier || event->modifiers() == Qt::KeypadModifier)) { setExpanded(index, !isExpanded(index)); } else { Qt::KeyboardModifiers modifiers = event->modifiers(); - if (modifiers == Qt::NoModifier) { + if (modifiers == Qt::NoModifier || modifiers == Qt::KeypadModifier) { emit bookmarkActivated(item); } else if (modifiers == Qt::ControlModifier) { diff --git a/src/lib/history/historytreeview.cpp b/src/lib/history/historytreeview.cpp index ffe8972d0..17bc8e339 100644 --- a/src/lib/history/historytreeview.cpp +++ b/src/lib/history/historytreeview.cpp @@ -227,13 +227,13 @@ void HistoryTreeView::keyPressEvent(QKeyEvent* event) switch (event->key()) { case Qt::Key_Return: case Qt::Key_Enter: - if (isTopLevel && event->modifiers() == Qt::NoModifier) { + if (isTopLevel && (event->modifiers() == Qt::NoModifier || event->modifiers() == Qt::KeypadModifier)) { setExpanded(index, !isExpanded(index)); } else { Qt::KeyboardModifiers modifiers = event->modifiers(); - if (modifiers == Qt::NoModifier) { + if (modifiers == Qt::NoModifier || modifiers == Qt::KeypadModifier) { emit urlActivated(url); } else if (modifiers == Qt::ControlModifier) { diff --git a/src/lib/navigation/completer/locationcompleterview.cpp b/src/lib/navigation/completer/locationcompleterview.cpp index a9f374e16..1359fe5da 100644 --- a/src/lib/navigation/completer/locationcompleterview.cpp +++ b/src/lib/navigation/completer/locationcompleterview.cpp @@ -71,7 +71,7 @@ bool LocationCompleterView::eventFilter(QObject* object, QEvent* event) break; } - if (modifiers == Qt::NoModifier) { + if (modifiers == Qt::NoModifier || modifiers == Qt::KeypadModifier) { emit indexActivated(idx); return true; } diff --git a/src/lib/tools/enhancedmenu.cpp b/src/lib/tools/enhancedmenu.cpp index 15378d3be..6b00ba595 100644 --- a/src/lib/tools/enhancedmenu.cpp +++ b/src/lib/tools/enhancedmenu.cpp @@ -99,7 +99,7 @@ void Menu::keyPressEvent(QKeyEvent* e) return; } - if (e->modifiers() == Qt::NoModifier) { + if (e->modifiers() == Qt::NoModifier || e->modifiers() == Qt::KeypadModifier) { closeAllMenus(); act->trigger(); e->accept();