Bug 408507

Summary: notification does not allow copying via shortcut
Product: [Plasma] plasmashell Reporter: johnathan <testing1237a-c>
Component: NotificationsAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED FIXED    
Severity: normal CC: bergentroll, bugseforuns, david.cortes.rivera, nate, plasma-bugs, sephiroth_pk, vikts
Priority: NOR Keywords: usability
Version: master   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=441095
Latest Commit: Version Fixed In: 5.23

Description johnathan 2019-06-10 04:44:41 UTC
SUMMARY
select any text in the notification panel. pressing "ctrl-c" shortcut should copy the selected text but it is not. it currently requires right clicking the text and selecting the "copy" button only.

STEPS TO REPRODUCE
1.  select any text in the notification panel and press copy shortcut on keyboard
2. 
3. 

OBSERVED RESULT
ctrl-c does not copy the selected text

EXPECTED RESULT
ctrl-c should copy the selected text as the notification window is "on top" already when open so there is no way ctrl-c could select anything else from the screen

SOFTWARE/OS VERSIONS
KDE Plasma: 

KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.59.0
Qt Version: 5.12.3

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2019-06-10 04:55:06 UTC
I think this is because the notification intentionally never gains focus, and the keyboard shortcut only applies to the currently-focused window.
Comment 2 Kai Uwe Broulik 2019-06-10 10:41:58 UTC
Correct, they don't accept focus, so it can't be done. It should probably at least support the selection clipboard for middle click paste.
Comment 3 Nate Graham 2019-06-10 12:56:56 UTC
Is there any way to hack this in without explicitly giving the notification focus?
Comment 4 johnathan 2019-06-10 17:04:14 UTC
the start menu search bar is able to accept the copy shortcut....
Comment 5 Kai Uwe Broulik 2019-06-11 07:18:16 UTC
> Is there any way to hack this in without explicitly giving the notification focus?

I don't think so.

> the start menu search bar is able to accept the copy shortcut....

The start menu accepts focus.
Comment 6 Nate Graham 2019-06-11 12:46:13 UTC
Is there a reason why a notification pop-up can't temporarily accept focus when text is selected? Pretty much the only reason for a user to do this would be for the purpose of copy-pasting it somewhere, so it's highly unlikely they they would expect keyboard shortcuts to affect the open app during this brief process of copying text in a notification.
Comment 7 Anton Karmanov 2021-04-10 17:31:09 UTC
Another inconvenience is that double and triple mouse clicks do not work also.
Comment 8 Kai Uwe Broulik 2021-04-10 17:33:21 UTC
Double and triple click works from 5.22 on, if the notification is non-interactive
Comment 9 Anton Karmanov 2021-04-10 17:42:01 UTC
I am on 5.80, 2-,3-clicks takes effect neither on pop-ups, nor on history of notifications.
Comment 10 Nate Graham 2021-04-13 15:16:37 UTC
*** Bug 435622 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2021-08-11 14:32:24 UTC
Will be fixed by https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1006!
Comment 12 David Redondo 2021-08-16 14:32:45 UTC
Git commit 60ff1e04e40765f5c28b5f6ab0c953840549ffa1 by David Redondo.
Committed on 16/08/2021 at 14:30.
Pushed by davidre into branch 'master'.

Let the notification take focus when interacted with

On wayland we need focus to copy to the clipboard.
As we don't want the notification to take focus indiscriminately,
it listens to mouse events of its children and only accepts focus
if it sees a button press. When  the cursor leaves the popup again,
everything is reset.
Related: bug 434675

M  +12   -2    applets/notifications/package/contents/ui/NotificationPopup.qml

https://invent.kde.org/plasma/plasma-workspace/commit/60ff1e04e40765f5c28b5f6ab0c953840549ffa1
Comment 13 Victoria 2022-08-03 11:42:13 UTC
This still does not work if you try copying from a full-size applet on a panel. Should I open another bug for it or reopen this one, since it seems to be the same issue but applet vs. pop-up?