Use shift+PageUp instead of Shift+Home to go to the first page or results: Shift+Home is useful to select the search entry text
This commit is contained in:
parent
2c6b023a88
commit
03b3bd4ac8
@ -350,7 +350,7 @@
|
||||
<string>Go to first page of results</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Shift+Home</string>
|
||||
<string>Shift+PgUp</string>
|
||||
</property>
|
||||
<property name="name" stdset="0">
|
||||
<cstring>firstPageAction</cstring>
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user