Bug 432263 - Shift- and Alt-Modifier keys do not change the drag and drop behaviour
Summary: Shift- and Alt-Modifier keys do not change the drag and drop behaviour
Status: CONFIRMED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Folder (show other bugs)
Version: 5.20.5
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-28 20:05 UTC by Derek Christ
Modified: 2024-05-04 21:41 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Derek Christ 2021-01-28 20:05:46 UTC
SUMMARY
In Dolphin when dragging a file and while doing so pressing either the Shift-, Alt-, or Ctrl-Modifier key does change the drag-and-drop behaviour to move, create a link, or copy. The mouse cursor icon changes accordingly too.
While this is implemented in Dolphin it should be also implemented on the desktop. Also dragging a file from Dolphin to the Desktop should also behave like this.
Currently pressing these buttons have no effect (please see additional info).

STEPS TO REPRODUCE
1. Drag a file on the desktop
2. Press the Alt key for example
3. Except to create a new link to that file
4. It will not change the behavior at all

OBSERVED RESULT
No changed behavior

EXPECTED RESULT
Changed behavior and also changed mouse cursor icon (like in Dolphin)

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20210127
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 5.10.9-1-default
OS Type: 64-bit

ADDITIONAL INFORMATION
I noticed that when one of the key is pressed before the dragging action happens, the cursor icon changes indeed as expected. But dropping the file will just move it as no key was pressed at all.
Comment 1 Nate Graham 2021-01-29 17:45:35 UTC
It does work for me, but the icon doesn't update properly.

Also you need to move  the dragged file at least one pixel after holding down the modifier key for it to take effect. This was fixed in Dolphin in Bug 388259. Perhaps the same fix is needed here.
Comment 2 Derek Christ 2021-02-04 18:08:01 UTC
(In reply to Nate Graham from comment #1)

> Also you need to move  the dragged file at least one pixel after holding
> down the modifier key for it to take effect.

Hm, I cannot really reproduce that. I'll try to sum up my findings in latest git master:

Desktop -> Desktop:
Modifier key will completely get ignored, even after moving at least one pixel after pressing the key. The file will be moved in any case.

Desktop -> Dolphin:
Everything works as expected. The cursor also updates immediately.

Dolphin -> Desktop:
The modifier keys work as expected, however the cursor does not update and always shows the default + symbol for the 'copy' action. Also here moving at least one pixel after pressing the key does not change anything.
Comment 3 Andrea Ippolito 2022-05-23 11:00:02 UTC
This is the behavior I'm observing on Wayland today.

Dolphin open in dual panel mode, showing two different folders inside my ~:

1.a) drag&drop a file, hold Shift before releasing mouse/touchpad -> tooltip is still shown (expected: file is moved)
2.a) drag&drop a file, hold Ctrl before releasing mouse/touchpad -> tooltip is still shown (expected: file is copied)
3.a) drag&drop a file, hold Ctrl+Shift before releasing mouse/touchpad -> file is copied without showing the tooltip (?!)

1.b) drag&drop a file, hold Shift before STARTING the drag&drop operation, then release mouse/touchpad -> file is moved, no tooltip is shown
2.b) drag&drop a file, hold Ctrl before STARTING the drag&drop operation, then release mouse/touchpad -> file is copied, no tooltip is shown
3.b) drag&drop a file, hold Ctrl+Shift before STARTING the drag&drop operation, then release mouse/touchpad -> file is linked, no tooltip is shown

So basically cases 1.a, 2.a and 3.a are all buggy.

On an X11 session 1.a = 1.b, 2.a = 2.b, 3.a = 3.b.
Comment 4 Andrea Ippolito 2024-03-17 19:17:18 UTC
(In reply to Andrea Ippolito from comment #3)
> This is the behavior I'm observing on Wayland today.
> 
> Dolphin open in dual panel mode, showing two different folders inside my ~:
> 
> 1.a) drag&drop a file, hold Shift before releasing mouse/touchpad -> tooltip
> is still shown (expected: file is moved)
> 2.a) drag&drop a file, hold Ctrl before releasing mouse/touchpad -> tooltip
> is still shown (expected: file is copied)
> 3.a) drag&drop a file, hold Ctrl+Shift before releasing mouse/touchpad ->
> file is copied without showing the tooltip (?!)
> 
> 1.b) drag&drop a file, hold Shift before STARTING the drag&drop operation,
> then release mouse/touchpad -> file is moved, no tooltip is shown
> 2.b) drag&drop a file, hold Ctrl before STARTING the drag&drop operation,
> then release mouse/touchpad -> file is copied, no tooltip is shown
> 3.b) drag&drop a file, hold Ctrl+Shift before STARTING the drag&drop
> operation, then release mouse/touchpad -> file is linked, no tooltip is shown
> 
> So basically cases 1.a, 2.a and 3.a are all buggy.
> 
> On an X11 session 1.a = 1.b, 2.a = 2.b, 3.a = 3.b.

I have just tested this again on a Wayland session with Plasma 6.0.2, and this still applies.