Bug 451539

Summary: Allow fast copy to clipboard on received SMS
Product: [Applications] kdeconnect Reporter: Daniel Duris <kdebugs>
Component: plasmoidAssignee: Albert Vaca Cintora <albertvaka>
Status: RESOLVED FIXED    
Severity: wishlist CC: uwu
Priority: NOR    
Version First Reported In: 1.10   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Daniel Duris 2022-03-15 18:34:42 UTC
SUMMARY
There are plenty of codes received using SMS. KDE Connect should have an option to quickly copy (alphanumeric) code to clipboard to reused it in other apps. Some regex matching need to be done (could be user defined, e.g. [a-zA-Z0-9]{6}).


STEPS TO REPRODUCE
1. Receive an SMS with a code.

OBSERVED RESULT
No action to quickly copy a code to clipboard.

EXPECTED RESULT
Action available on clicking KDE Connect to code copy to clipboard. Even auto copy could be done, if there is regex match in the SMS message.
Comment 1 Bug Janitor Service 2024-01-02 19:58:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/633
Comment 2 Kristen McWilliam 2024-10-17 17:51:46 UTC
Git commit caaac80ca5cde5d94cdf3617a4fba4b4a19f38b2 by Kristen McWilliam.
Committed on 17/10/2024 at 17:51.
Pushed by merritt into branch 'fix_copy_auth_code'.

fix: copy auth code to desktop clipboard

SMS auth codes generate a notification that has a "Copy $code" button
(eg. "Copy 123456"), but the button doesn't actually copy the code as
expected. This patch fixes that.
Related: bug 435614

M  +2    -1    plugins/notifications/CMakeLists.txt
M  +30   -0    plugins/notifications/notificationsplugin.cpp
M  +8    -0    plugins/notifications/notificationsplugin.h
M  +3    -0    tests/CMakeLists.txt
A  +93   -0    tests/notificationstest.cpp     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]

https://invent.kde.org/network/kdeconnect-kde/-/commit/caaac80ca5cde5d94cdf3617a4fba4b4a19f38b2
Comment 3 Kristen McWilliam 2025-03-26 16:16:57 UTC
Git commit 92e61c07c639c3a2b7e6e87478777142bd97dafb by Kristen McWilliam.
Committed on 26/03/2025 at 16:07.
Pushed by merritt into branch 'master'.

fix: copy auth code to desktop clipboard

SMS auth codes generate a notification that has a "Copy $code" button
(eg. "Copy 123456"), but the button doesn't actually copy the code as
expected. This patch fixes that.
Related: bug 435614

M  +2    -1    plugins/notifications/CMakeLists.txt
M  +30   -0    plugins/notifications/notificationsplugin.cpp
M  +8    -0    plugins/notifications/notificationsplugin.h
M  +3    -0    tests/CMakeLists.txt
A  +93   -0    tests/notificationstest.cpp     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]

https://invent.kde.org/network/kdeconnect-kde/-/commit/92e61c07c639c3a2b7e6e87478777142bd97dafb