diff --git a/src/qtgui/rclmain.ui b/src/qtgui/rclmain.ui
index 3b66dd1e..a5b799b9 100644
--- a/src/qtgui/rclmain.ui
+++ b/src/qtgui/rclmain.ui
@@ -350,7 +350,7 @@
Go to first page of results
- Shift+Home
+ Shift+PgUp
firstPageAction
diff --git a/src/qtgui/rclmain_w.cpp b/src/qtgui/rclmain_w.cpp
index e3e3e83e..95e9be00 100644
--- a/src/qtgui/rclmain_w.cpp
+++ b/src/qtgui/rclmain_w.cpp
@@ -1796,17 +1796,9 @@ bool RclMain::eventFilter(QObject *, QEvent *event)
{
if (event->type() == QEvent::KeyPress) {
LOGDEB2(("RclMain::eventFilter: keypress\n"));
- QKeyEvent *ke = (QKeyEvent *)event;
- // Shift-Home is the shortcut for the 1st result page action, but it is
- // filtered by the search entry to mean "select all line". We prefer to
- // keep it for the action as it's easy to find another combination to
- // select all (ie: home, then shift-end)
- if (ke->key() == Qt::Key_Home &&
- (ke->modifiers() & Qt::ShiftModifier)) {
- // Shift-Home -> first page of results
- reslist->resultPageFirst();
- return true;
- }
+ // We used to map shift-home to reslist "goto first page"
+ // here but we now use shift-pageUp because shift-home is
+ // useful to select all inside the search entry
} else if (event->type() == QEvent::Show) {
LOGDEB2(("RclMain::eventFilter: Show\n"));
// move the focus to the search entry on show
diff --git a/src/qtgui/reslist.cpp b/src/qtgui/reslist.cpp
index 82eeae32..b747fc3c 100644
--- a/src/qtgui/reslist.cpp
+++ b/src/qtgui/reslist.cpp
@@ -507,12 +507,20 @@ bool ResList::getDoc(int docnum, Rcl::Doc &doc)
void ResList::keyPressEvent(QKeyEvent * e)
{
- if (e->key() == Qt::Key_PageUp || e->key() == Qt::Key_Backspace) {
- resPageUpOrBack();
- return;
- } else if (e->key() == Qt::Key_PageDown || e->key() == Qt::Key_Space) {
- resPageDownOrNext();
- return;
+ if ((e->modifiers() & Qt::ShiftModifier)) {
+ if (e->key() == Qt::Key_PageUp) {
+ // Shift-PageUp -> first page of results
+ resultPageFirst();
+ return;
+ }
+ } else {
+ if (e->key() == Qt::Key_PageUp || e->key() == Qt::Key_Backspace) {
+ resPageUpOrBack();
+ return;
+ } else if (e->key() == Qt::Key_PageDown || e->key() == Qt::Key_Space) {
+ resPageDownOrNext();
+ return;
+ }
}
RESLIST_PARENTCLASS::keyPressEvent(e);
}