Bug 498867 - ctrl+c shortcut doesn't work for copying files from desktop
Summary: ctrl+c shortcut doesn't work for copying files from desktop
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop icons & Folder View widget (show other bugs)
Version: 6.2.5
Platform: Arch Linux Linux
: HI normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
: 499073 (view as bug list)
Depends on:
Blocks:
 
Reported: 2025-01-19 00:46 UTC by akb825
Modified: 2025-01-27 20:22 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description akb825 2025-01-19 00:46:53 UTC
SUMMARY
When selecting files on the desktop, using ctrl+c to copy doesn't update the clipboard. The alternate shortcut (ctrl+insert) works, as does ctrl+x to cut, so some shortcuts are still working on the desktop. Copying through the contextual menu also works.

STEPS TO REPRODUCE
1. Select a file on the desktop.
2. Press ctrl+c to copy.
3. Attempt to paste the file somewhere else.

OBSERVED RESULT
The previous clipboard contents are pasted.

EXPECTED RESULT
The file copied is pasted.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Arch Linux
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1

ADDITIONAL INFORMATION
I am using a Wayland session.
Comment 1 Nate Graham 2025-01-21 20:18:12 UTC
Can reproduce.
Comment 2 David Redondo 2025-01-22 09:04:48 UTC
Works for me on master. Is this still an issue with 6.3 beta or master?
Comment 3 Nate Graham 2025-01-22 20:23:52 UTC
I'm able to reproduce the issue on master, with Qt 6.8.1. Locale doesn't seem to an issue, as I can still reproduce it with `LANGUAGE=de_DE plasmashell`
Comment 4 David Redondo 2025-01-23 07:47:13 UTC
So basically the same setup as me, weird. I also tried to see if having multiple screens with folderviews changes these but it works as well
Comment 5 Bug Janitor Service 2025-01-23 12:32:46 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2740
Comment 6 Bug Janitor Service 2025-01-23 16:15:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/1710
Comment 7 Marco Martin 2025-01-23 16:50:31 UTC
Git commit 81d06f7b34b841375f4ab040c081d0f06fca6279 by Marco Martin.
Committed on 23/01/2025 at 16:50.
Pushed by mart into branch 'master'.

SelectableLabel: disable shortcuts when invisible or no text selected

the shortcut will always be registered even if there is no text selected
or the control is not visible, which can be problematic because it can
steal ctrl+c from other controls

the enabled binding needsto be on the action and not on the MenuItem
for the shortcut to be properly disabled

M  +2    -1    src/controls/SelectableLabel.qml

https://invent.kde.org/frameworks/kirigami/-/commit/81d06f7b34b841375f4ab040c081d0f06fca6279
Comment 8 Bug Janitor Service 2025-01-27 11:39:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/654
Comment 9 Marco Martin 2025-01-27 14:57:15 UTC
Git commit a226f8cb7661951ee56d1e7eac8993e61788c016 by Marco Martin.
Committed on 27/01/2025 at 14:57.
Pushed by mart into branch 'master'.

applets/notes: don't steal shortcuts to FloderView

Shortcuts are in the context of the window, so the notes applet will
steal any shortcut that folderview would register as well, such as
the paste shortcut.
If there is a note on the desktop, after copying a file from dolphin,
ctrl+v with folderview focused will paste the file url in the note.
as well other shortcuts such as undo/redo will have effect even if
the note is not focused

This enables the shortcut only when the context menu is open, as the same
actions are triggered as normal key events when the text field is focused

M  +11   -10   applets/notes/package/contents/ui/main.qml

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/a226f8cb7661951ee56d1e7eac8993e61788c016
Comment 10 Bug Janitor Service 2025-01-27 14:58:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/656
Comment 11 Marco Martin 2025-01-27 14:58:24 UTC
Git commit e9c12fab2a2c30f8fe816ca13a27a8ff23980d8a by Marco Martin.
Committed on 27/01/2025 at 14:57.
Pushed by mart into branch 'Plasma/6.3'.

applets/notes: don't steal shortcuts to FloderView

Shortcuts are in the context of the window, so the notes applet will
steal any shortcut that folderview would register as well, such as
the paste shortcut.
If there is a note on the desktop, after copying a file from dolphin,
ctrl+v with folderview focused will paste the file url in the note.
as well other shortcuts such as undo/redo will have effect even if
the note is not focused

This enables the shortcut only when the context menu is open, as the same
actions are triggered as normal key events when the text field is focused


(cherry picked from commit a226f8cb7661951ee56d1e7eac8993e61788c016)

8eacebaf applets/notes: don't steal shortcuts to FloderView
62c9a630 only enable when menu open

Co-authored-by: Marco Martin <notmart@gmail.com>

M  +11   -10   applets/notes/package/contents/ui/main.qml

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/e9c12fab2a2c30f8fe816ca13a27a8ff23980d8a
Comment 12 Nate Graham 2025-01-27 20:22:47 UTC
*** Bug 499073 has been marked as a duplicate of this bug. ***