Bug 418373 - Add shortcut for Tag apply button
Summary: Add shortcut for Tag apply button
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Usability-Keyboard (other bugs)
Version First Reported In: 6.4.0
Platform: Microsoft Windows Microsoft Windows
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-01 21:14 UTC by Kamo
Modified: 2023-05-13 12:38 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 8.1.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kamo 2020-03-01 21:14:12 UTC
SUMMARY
Currently there's no shortcut for Tag apply button. Using Enter button could be used as a workaround, but adding separate shortcut would be helpful.
Comment 1 Marcel 2020-06-20 11:17:34 UTC
Probably this tutorial will solve the problem. https://userbase.kde.org/Digikam/Assign_Keyboard_Shortcuts_to_Tags_in_digiKam. 

It describes how to apply a specific tag to an image with a shortcut and without the need of any confirmation.
Comment 2 caulier.gilles 2020-06-22 14:05:04 UTC
Marcel,

I think end use want to see a keyboard shortcut assigned to the button in source code.

Typically, when Caption right sidebar tab is open, pressing ENTER must apply button or something like that. We need to check all cases to see if no conflict exists when user enter comment, or if focus is on another widget and not especially a text field.

Gilles
Comment 3 Kamo 2020-07-11 04:25:02 UTC
Yes, perhaps I was not descriptive enough.

Currently there are two ways to apply tag in digikam; one is to click Tag Apply button on the bottom of the screen, or press Enter. Those two behave a bit differently, pressing Enter prompts confirmation windows and after that the selection moves to next image. Clicking Tag apply button, on the other hand, just applies a tag as is - without confirmation message or moving on to next image. So I thought it would be useful if there was a separate shortcut specifically for Tag Apply button.
Comment 4 caulier.gilles 2020-07-11 06:04:42 UTC
Kamo,

Do you know that you can already assign shortcut to you prefered tags ? It's a property of tags editable in tag config dialog.

Best

Gilles Caulier
Comment 5 Marcel 2020-07-11 06:22:44 UTC
Thank you for clarifying the problem. I definitely misunderstood the problem. 

1. Apply button applies the tag information to the image
2. Pressing enter on the images after selecting the tag always switches from the thumbnails to the Preview view. A side effect is that the image widget loses its focus so Digikam asks to apply the changes of the tag. I think that is what you experience.  

When selecting the tag the mouse anyway is used. Clicking to another (next ?) image/selection also forces the dialog if the changes should be applied, but does not switch the view. Probably this already fits your needs?

By the way, the solution of Gilles is described on my fist comment.
Comment 6 caulier.gilles 2020-07-11 09:28:58 UTC
Marcel,

My first proposal is the more simple way to fix the problem, but it's not the best.

Ideally, We must implement a context proxy for all digiKam main view. This proxy will know which main view is active (left or right sidebar, central view with icon or preview or map, etc.), know which sidebar tab is active (the vertical selection), which sidebar internal view is active (horizontal view as with comments tab for ex). Finally, in the internal sidebar view, the proxy must know which widget as the focus, and enable or disable the keyboard shortcuts accordingly.

Why this kind of complex "proxy" stuff ? Because between all these view combination, the current focus will do not have the same action in digiKam, for ex with ENTER key.

I know that Gwenview implmement this proxy mechanism, and probably also Dolphin. I will try to find some code pointers in gitlab...

And yes implementing a proxy can be complex to do with a lots of regression tests.

Gilles
Comment 7 caulier.gilles 2023-05-13 12:38:44 UTC
The entry can be completely solved using Tags shortcuts assignation. You don't need to open right sidebar Captions/Tags. Just pressing a combination of keys will apply the keywords.

See Tags Properties dialog for details :

https://docs.digikam.org/en/main_window/tags_view.html#managing-tags

I close this file now.