Bug 394988 - PgDown and PgUp hardcoded in preview mode
Summary: PgDown and PgUp hardcoded in preview mode
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Usability-Keyboard (show other bugs)
Version: 5.9.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-03 14:07 UTC by Peter Albrecht
Modified: 2018-06-06 18:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Albrecht 2018-06-03 14:07:34 UTC
++ Steps to reproduce:

1. in main menu: open "Settings" -> "Configure Shortcuts..."
2. search for "next"
3. set alternate shortcut for "General: Next Image" to "PgDown" (= page down)
4. close settings with "OK"
5. select an image
6. in main menu: select "View" -> "Preview"
7. press the key "PgDown" on the keyboard
-> nothing happens
8. press the key "PgDown" on the keyboard again
-> the following messagebox pops up:

------------------------------------- 8< -------------------------------------
Ambiguous shortcut detected - digiKam

The key sequence 'PgDown' is ambigious. Use 'Configure Shortcuts' from the 'Settings' menu to solve the ambiguity.
No action will be triggert
------------------------------------- >8 -------------------------------------

The same problem exists for "PgUp".


++ Expected behavior:

Pressing "PgDown" should switch from the current previewed image to the next image in the current album, since I configured this in "Settings" -> "Configure Shortcuts...".
Pressing "PgUp" should switch from the current previewed image to the previous image in the current album.


++ Additional information:

Without configuring the shortcut "PgDown" to "Next Image", switching to the next image in preview mode works fine.

But I need this configured shortcut for my tagging workflow: 
1. open image in preview mode
2. assign tags via keyboard actions
3. switch to the next image (to tag) via keyboard action "PgDown", while input focus stays in input box "Enter tag here." (I can't use the default "Next Image" shortcut in this case, since it is "space")
Comment 1 Maik Qualmann 2018-06-03 15:08:02 UTC
That we hardcoded the page up and down keys does not matter here. If I remember correctly, the keyboard event is queried, of which the shortcuts dialog knows nothing. If I assign page up and down keys here and the focus is in the tag search box, it works as desired. Check in the shortcuts dialog whether you are not already using page up and down, or even globally from your desktop system.

Maik
Comment 2 Peter Albrecht 2018-06-03 20:36:18 UTC
@Maik:
I use KDE as desktop environment. And I installed Debian Stretch this morning on this computer. (So I had not much time to change shortcuts. And can't remember doing so anywhere else then in digiKam.)

I checked my defined shortcuts:
In digiKam there is no other shortcut bound to "PgDown" or "PgUp" then "Next Image" or "Previous Image". There is no "PgDown" or "PgUp" shortcut defined in KDE's "Global Shortcuts". But there had been defined shortcuts for "PgUp"="Previous Page" and "PgDown"="Next Page" in KDE's "Standard Shortcuts".
After removing those, I can no longer scroll in KWrite via PgUp or PgDown. So the change had some effect. But after restarting digiKam, the behavior is still like my first comment said: Changing images in "preview mode" leads to the messagebox: "Ambiguous shortcut detected".

Can you scroll through images in preview mode after having assigned "PgDown" to "Next Image" while the input focus is on a thumbnail in the thumbnail roll above the preview image?

For me, switching images via PgDown/PgUp works, if input is in the tag search box. But it fails, if the focus is on a thumbnail in the thumbnail row above the preview image.

(Just discovered: Alongside the configured default shortcuts "space"/"backspace" one can also switch images in preview mode with: Cursor left/right or cursor up/down - although not explicitly configured)
Comment 3 Maik Qualmann 2018-06-03 20:59:03 UTC
Ok, in the preview I can confirm the problem. We add these shortcuts. I'll look for a solution tomorrow.

void DigikamView::Private::addPageUpDownActions(DigikamView* const q, QWidget* const w)
{
    defineShortcut(w, Qt::Key_PageDown, q, SLOT(slotNextItem()));
    defineShortcut(w, Qt::Key_Down,     q, SLOT(slotNextItem()));
    defineShortcut(w, Qt::Key_Right,    q, SLOT(slotNextItem()));

    defineShortcut(w, Qt::Key_PageUp,   q, SLOT(slotPrevItem()));
    defineShortcut(w, Qt::Key_Up,       q, SLOT(slotPrevItem()));
    defineShortcut(w, Qt::Key_Left,     q, SLOT(slotPrevItem()));
}

Maik
Comment 4 Maik Qualmann 2018-06-04 10:38:14 UTC
Git commit 67976d43fb7c86f4ca7066ccc8f144f155f7b4a6 by Maik Qualmann.
Committed on 04/06/2018 at 10:37.
Pushed by mqualmann into branch 'master'.

add page up and down shortcuts to the right sidebar
FIXED-IN: 6.0.0

M  +2    -1    NEWS
M  +3    -4    core/app/views/digikamview.cpp

https://commits.kde.org/digikam/67976d43fb7c86f4ca7066ccc8f144f155f7b4a6
Comment 5 Maik Qualmann 2018-06-04 10:42:11 UTC
Note: You must remove page up and down from the shortcut dialog. These shortcuts must remain hardcoded. You can now use page up and down in the tag search field.

Maik
Comment 6 Peter Albrecht 2018-06-06 18:33:43 UTC
Thanks! It works great in pre-release "digikam-6.0.0-git-20180605T154040-x86-64.appimage"!