Bug 500439 - improvement: allow keyboard shortcuts for clipper-icons (action/qrcode/edit/delete)
Summary: improvement: allow keyboard shortcuts for clipper-icons (action/qrcode/edit/d...
Status: RESOLVED INTENTIONAL
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (other bugs)
Version First Reported In: 6.3.0
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-19 22:32 UTC by slartibart70
Modified: 2025-05-16 15:28 UTC (History)
2 users (show)

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


Attachments
(i) icon sample (25.19 KB, image/png)
2025-02-20 12:26 UTC, slartibart70
Details

Note You need to log in before you can comment on or make changes to this bug.
Description slartibart70 2025-02-19 22:32:26 UTC
Open the klipper either in the system-tray or with Meta-V

Each entry has 4 icons as overlay - invoke action / qr code / edit /delete
These icons are only accessible with the mouse
as far as i can see, there is no keyboard-shortcut availabe for, e.g. invoking the edit-mode?

This is especially useful if you open the popup with Meta-V, select an entry with the keyboard, call 'edit' on this entry (with a to-be-defined shortcut, like e.g. Ctrl-E) and then select parts of the copied content (again, with the keyboard) and press Ctrl-C - just because you need only a specific portion of what you previously copied...

Yes, i know.. i'm a keyboard junky. Nonetheless, i would find it useful.
Especially since we already have global shortcurts to invoke actions on the currently-active clipboard content. This would improve usability and extend actions also on historical clipboard entries (by leveraging the klipper popup/Meta-V)
Comment 1 slartibart70 2025-02-19 22:33:30 UTC
Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.12.15-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 2 cwo 2025-02-20 09:23:59 UTC
(In reply to slartibart70 from comment #0)
> These icons are only accessible with the mouse
> as far as i can see, there is no keyboard-shortcut availabe for, e.g.
> invoking the edit-mode?

You can use arrow keys to reach them. Pressing e.g. right arrow key three times after moving focus to an item will allow you to activate the Edit button.

In the panel popup, accelerator keys also work, but they're not advertised in the UI as the buttons are icon-only (e.g. Alt-I for invoke action or Alt-E for edit, but it likely depends on the language you have set). These do not seem to work in the Meta+V popup version though. 

This should probably be made more consistent, butI fear not very useful at present given that we don't tell the user about them. And as the user likely already has the hands on the arrow keys to select the items and the small number of possible actions, there's not a lot of key presses to be saved here with an accelerator shortcut - you'd save at most three key presses, and that's with counting Alt+Letter as one key press.
Comment 3 slartibart70 2025-02-20 11:46:10 UTC
yes, arrow keys work.

But, the shortcuts with Alt- work only for invoke action (alt-i), qr-code (alt-q) and delete (alt-r)
And yes, they do work in popup (meta-v) and in system-tray.

But: Edit is not reachable by shortcut (i tried all letters as shown in the hover-menu but wasn't succesful. I'm using english/us as language), neither in systray nor popup.

The problem with arrow-keys is, that you need to select the icon and then press space(!) to invoke the action. Return just closes the popup created by Meta-V. (Not very intuitive, don't you think? :-)

So, i would be happy if the (auto-generated shortcut with alt-) also works for 'edit'.
Let's shift the focus of this bug-report then to make edit reachable similar to qr/remove/action by shortcut.

Maybe it could help, if the hover-menu would indicate the active letter with an underline , similar to the visual guide in application-menus?
Comment 4 slartibart70 2025-02-20 11:47:45 UTC
sorry... not hover-menu.
I was referring to the information-popup that you get when hovering with the mouse over the icons
Comment 5 slartibart70 2025-02-20 11:57:54 UTC
one more thing:
see also https://bugs.kde.org/show_bug.cgi?id=500438

Invoking actions on the meta-v popup with keyboard shortcuts also don't work (popup auto-closes when rendering the actions-menu)

So, the truly working shortcuts in meta-v popup are limited to: qr-code (with alt-q, but, only in popup, not in systray?)
(remove is also not removing items)

I think this part of shortcut handling needs some review :-) and, as you already indicated, some refinement regarding the communication of those functionality to the user...
Comment 6 cwo 2025-02-20 12:02:08 UTC
(In reply to slartibart70 from comment #3)

> But: Edit is not reachable by shortcut (i tried all letters as shown in the
> hover-menu but wasn't succesful. I'm using english/us as language), neither
> in systray nor popup.

Works with Alt-E for me. But the assignment may be dynamic depending on what letters are available, and there may be an issue there. (I'll have to check if we explicitly set one. It also sometimes seems to work only on the second try.

> The problem with arrow-keys is, that you need to select the icon and then
> press space(!) to invoke the action. Return just closes the popup created by
> Meta-V. (Not very intuitive, don't you think? :-)

Maybe not intuitive, but it should be consistent - space is the key that activates buttons and similar controls like checkboxes and radio buttons. Return is the key that indicates a larger accept.

For example, in a dialog that has internal buttons like the Properties dialog in Dolphin, you can tab to the Refresh, Explore in Filelight, etc. buttons, then activate them with space. If you press Return, it will operate on the whole dialog and do the default action there, closing it.

Or in the Network connection widget (usually in the system tray), when you arrow to an entry, space will act as if you clicked it and expand the details view, but Return will initiate the connection (prompting for the password if needed) 

> Maybe it could help, if the hover-menu would indicate the active letter with
> an underline , similar to the visual guide in application-menus?

Maybe, I'm not sure this would work (it might) but having to press alt while hovering over a tool tip isn't exactly discoverable. I don't think accelerator keys are generally a good fit for our icon-only buttons, to be honest - with the way we've implemented them they have to be somewhat dynamic, so they only work well with immediate visual feedback.
Comment 7 slartibart70 2025-02-20 12:23:15 UTC
thanks for the quick update.
(i was aware of the space/return differences, but a refresher is always welcome!)

Regarding the hover-popup: I would not wait until someone presses Alt to show the underlines, but instead show them immediately.

This could be a bit confusing, though: typically, hover-popups indicate the concept behind the button/icon/.. and not the (here: not-displayed icon-text information).
My approach would be, to show the hidden icon-text only if there is no other text for the hover-popup defined. If there is, then show this one.

Not sure, if this approach is a good one.
Or, even easier:
Make some kind of legend in the meta-v popup with an (i) info - icon (similar to the systemsettings).
In this hoverable (i) area, there would be enough space for explaining text?
Comment 8 slartibart70 2025-02-20 12:25:14 UTC
we already have a search-box on top, a 'clear history' icon.... there would be space to put in an (i) icon
Comment 9 slartibart70 2025-02-20 12:26:33 UTC
Created attachment 178631 [details]
(i) icon sample
Comment 10 cwo 2025-02-20 12:39:53 UTC
There's an issue with translations there I think; we don't know them in advance, so we would have to either pre-define them completely or somehow translatie the internal representations so that the key names are in the local language.

Keyboard shortcuts in tooltips are something we do sometimes, for example on the top items in Discover's sidebar.

I'm not opposed to the idea of exposing this and making it work more consistently, but I'm also not convinced it's necessary given that arrow keys work, you'll need the arrow keys anyway to choose the item in most circumstances, and there's so few key strokes to be saved.
Comment 11 Nate Graham 2025-05-16 15:28:42 UTC
I agree with Christoph here. The effort-to-reward ratio seems poor, sorry.

If someone comes up with an amazing patch, that's a different story, and we could perhaps consider it.