Bug 344969 - Shortcut configuration for Folder View actions not handled by standard keys
Summary: Shortcut configuration for Folder View actions not handled by standard keys
Status: CLOSED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Folder (show other bugs)
Version: 5.7.1
Platform: Kubuntu Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Leslie Zhai
URL:
Keywords:
: 343495 346726 349431 353402 354101 354270 354483 354732 354995 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-03-09 09:41 UTC by Ronny
Modified: 2018-03-25 17:04 UTC (History)
23 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 Ronny 2015-03-09 09:41:26 UTC
This is a plasma 5.2.1 bug (Kubuntu 15.04 alpha).
I couldn't find a bugtracker for this version.
Sorry for putting it into the version 4 tracker.

I can't delete any files in the folder view.
Not via right click and also not via shift+delete.
Just moving to trash is possible.

Can you please fix this?
I don't want to switch the console just to delete a file.

Reproducible: Always

Steps to Reproduce:
1. add a folderview
2. select a file
3. press shift+delete
4. nothing happens


Expected Results:  
the kde4 behavior

Prompt asking whether I really want to delete it. then delete it.
Comment 1 Ronny 2015-03-11 10:03:15 UTC
Pressing f2 to rename a file does not work, as well.

Can you please add that, too?

best regards,
Ronny
Comment 2 Eike Hein 2015-03-24 20:38:57 UTC
To get Delete in the context menu, enable showing it in Dolphin - they share configuration on this. Unfortunately however, the KF5 version of Dolphin is so far unreleased and KDE 4 Dolphin won't do the trick.

As for shortcuts, this remains an unsolved general problem. We support basic trashing via Del because Qt has a standard key entry for "Delete" which our KF5 platform plugin maps back to the standard shortcut for "Trash" that you can configure via System Settings -> Shortcuts -> Application Keyboard Shortcuts. But neither KDE nor Qt have standard keys for an elevated "Delete" or for "Rename", so Folder View needs custom actions for this, which has the problem of us not having a way to put keyboard shortcut config into applet (or containment) config dialogs.

I don't want hacks there though but a proper solution.

Marco, can you opine on keyboard shortcut config for applets/containments?
Comment 3 Ronny 2015-03-25 08:47:00 UTC
Thanks a lot for the explanation.
That's very unfortunate.
I really really hope this will be added.
Comment 4 Eike Hein 2015-04-26 17:10:32 UTC
*** Bug 346726 has been marked as a duplicate of this bug. ***
Comment 5 Mister Ypsilon 2015-08-17 14:02:09 UTC
F5 for refreshing is missing as well
Comment 6 David Edmundson 2015-08-17 14:02:20 UTC
*** Bug 349431 has been marked as a duplicate of this bug. ***
Comment 7 Eike Hein 2015-10-01 18:56:46 UTC
*** Bug 353402 has been marked as a duplicate of this bug. ***
Comment 8 Janek Bevendorff 2015-10-02 15:12:56 UTC
Files can be deleted in 4.2.1, but only by moving them to the trash. Some other shortcuts such as Shift+Del to delete without moving files to the Trash or copying and pasting via shortcuts still doesn't work (can only be done by using the right-click menu).
Comment 9 Eike Hein 2015-10-17 13:38:23 UTC
*** Bug 343495 has been marked as a duplicate of this bug. ***
Comment 10 Eike Hein 2015-10-19 19:55:09 UTC
*** Bug 354101 has been marked as a duplicate of this bug. ***
Comment 11 Eike Hein 2015-10-24 15:01:00 UTC
*** Bug 354270 has been marked as a duplicate of this bug. ***
Comment 12 Andrei Ivnitskii 2015-10-26 08:50:00 UTC
Same problem :(
Comment 13 Eike Hein 2015-10-28 14:19:48 UTC
*** Bug 354483 has been marked as a duplicate of this bug. ***
Comment 14 Eike Hein 2015-11-02 12:21:33 UTC
*** Bug 354732 has been marked as a duplicate of this bug. ***
Comment 15 Eike Hein 2015-11-07 16:36:16 UTC
*** Bug 354995 has been marked as a duplicate of this bug. ***
Comment 16 Leon 2015-11-28 07:53:56 UTC
same problem for me too :-(
STRG+C 
STRG+X
etc. do not work either...
Comment 17 Leslie Zhai 2015-12-04 03:40:25 UTC
please have a look at https://git.reviewboard.kde.org/r/126238/ thanks a lot ;-)
Comment 18 Leon 2015-12-04 10:53:15 UTC
Hi Leslie,
thanks for the link. I have found FolderView.qml (on my system it was here: /usr/share/plasma/plasmoids/org.kde.desktopcontainment/contents/ui/) and added the else if clause.

But the file foldermodel.h does not seem to be on my system. 
Without those changes STRG+X and STRG+C do not work.
What should I do now?
Comment 19 Leslie Zhai 2015-12-07 01:57:01 UTC
Hi Leon, you have to git clone git@git.kde.org:plasma-desktop, and apply my patch then rebuilt the plasma-desktop ;-)
Comment 20 Leon 2016-01-05 18:27:52 UTC
Hi Leslie,
thank you very much for your help. But I think I will wait for the next ubuntu update, lazy as I am...
Comment 21 Mike 2016-02-20 18:40:06 UTC
The bug seems to be still unfixed with the recent version of Plasma 5.5.4. any news or fixes ? I'm on Manjaro 15.12 Capella.
Mike
Comment 22 Eike Hein 2016-02-21 04:26:32 UTC
No work on this yet, sorry.
Comment 23 rmbg 2016-02-23 13:45:23 UTC
What about the next 5.5.5 version?
Comment 24 Eike Hein 2016-02-23 13:58:59 UTC
This is a huge change that won't happen in a bugfix release.
Comment 25 rmbg 2016-03-01 18:34:10 UTC
Why didn't work shift + del implemented in Leslie patch?
Comment 26 Nick Stefanov 2016-05-08 11:49:25 UTC
We still can't Shift+Del and F2.
Comment 27 vindicator 2016-07-13 07:26:06 UTC
Wow over 1 year and still no delete shortcut key for the desktop.
Just adding myself to keep tabs on this issue that just seems to be common sense.
I had hoped that removing "shift-del" from the "cut" shortcut might have magically have force the file/folders to be rm'd.
I just want to avoid moving items to the trash because 1) emptying would be another step, 2) moving items to the trash (specifically the first try) takes forever which apparently is another old "bug" (https://bugs.kde.org/show_bug.cgi?id=331707).
Comment 28 Nick Stefanov 2016-07-13 08:54:26 UTC
This bug exists on all Plasma 5 desktops but nobody seems to care...
Comment 29 Janek Bevendorff 2016-07-13 09:31:12 UTC
I can also confirm the slow move to trash. It has annoyed me ever since the new Folder widget was introduced. The bug report is for Konqueror, however. Maybe someone should update that. I didn't report it here because after the upgrade to 5.7.1 yesterday, it seemed to work. But when I booted up my computer again today, the issue was back. Moving a file to the trash takes about 5 seconds and produces an annoying desktop notification while it's in progress.

I would love to finally see the folder plasmoid being fixed. It's not in a very usable state right now.
Comment 30 vindicator 2016-07-13 18:23:23 UTC
5 seconds for you? That's it? I WISH I had it only take that long.
Try 1 minute 40 seconds for me, for a single "touched" file.
I simply had rebooted, logged in, let the system settle down, "$ touch ~/Desktop/testfile), start a terminal session for journalctl, then dragged the testfile to the trash... and waited
*****
Jul 13 13:10:32 devx64 kuiserver5[1135]: kuiserver: adding job contact for address:  ":1.20"  objectPath:  "/DataEngine/applicatio
Jul 13 13:10:32 devx64 kdeinit5[1803]: initialization OK, home trash dir: "/home/username/.local/share/Trash"
Jul 13 13:10:32 devx64 kdeinit5[1803]: TrashProtocol::rename(): old= QUrl("file:///home/username/Desktop//testfile")  new= QUrl("tras
Jul 13 13:10:32 devx64 kdeinit5[1803]: trashing a file to  "/" QUrl("file:///home/username/Desktop//testfile") QUrl("trash:/testfile"
Jul 13 13:10:32 devx64 kdeinit5[1803]: "/home/username/Desktop//testfile"
Jul 13 13:10:32 devx64 kdeinit5[1803]: "/home/username/Desktop//testfile"
Jul 13 13:10:32 devx64 kdeinit5[1803]: trashing to 0
Jul 13 13:10:32 devx64 kdeinit5[1803]: trying to create "/home/username/.local/share/Trash/info/testfile.trashinfo"
Jul 13 13:10:32 devx64 kdeinit5[1803]: info file created in trashId= 0 : "testfile"
Jul 13 13:10:32 devx64 kdeinit5[1803]: calling moveToTrash( "/home/username/Desktop//testfile"   0   "testfile" )
Jul 13 13:10:32 devx64 kdeinit5[1803]: Trashing "/home/username/Desktop//testfile" 0 "testfile"
Jul 13 13:10:32 devx64 plasmashell[1006]: Could not find service for job "Job 1" with app name "org.kde.plasmashell"
Jul 13 13:10:32 devx64 plasmashell[1006]: qml:  totalCountChanged 1
Jul 13 13:12:09 devx64 kdeinit5[1803]: "/home/username/Desktop//testfile" -> "/home/username/.local/share/Trash/files/testfile"
Jul 13 13:12:09 devx64 kdeinit5[895]: log_kioremote: RemoteDirNotify::FilesAdded
Jul 13 13:12:09 devx64 kdeinit5[895]: log_kioremote: RemoteDirNotify::toRemoteURL( QUrl("file:///home/username/.local/share/Trash/fil
Jul 13 13:12:09 devx64 kdeinit5[895]: log_kioremote: result => KUrl()
Jul 13 13:12:09 devx64 plasmashell[1006]: finalDestUrl= "trash:/0-testfile"
Jul 13 13:12:09 devx64 kdeinit5[895]: log_kioremote: RemoteDirNotify::FilesAdded
Jul 13 13:12:09 devx64 kuiserver5[1135]: kuiserver: making async call of terminate for:  "/DataEngine/applicationjobs/JobView_1"
Jul 13 13:12:09 devx64 kdeinit5[895]: log_kioremote: RemoteDirNotify::toRemoteURL( QUrl("trash:/") )
Jul 13 13:12:09 devx64 kdeinit5[895]: log_kioremote: result => KUrl()
Jul 13 13:12:09 devx64 kdeinit5[895]: log_kioremote: RemoteDirNotify::FilesRemoved
Jul 13 13:12:09 devx64 kuiserver5[1135]: kuiserver: removing jobview from list, it finished
Jul 13 13:12:09 devx64 kdeinit5[895]: log_kioremote: RemoteDirNotify::toRemoteURL( QUrl("file:///home/username/Desktop//testfile") )
Jul 13 13:12:09 devx64 kdeinit5[895]: log_kioremote: result => KUrl()
Jul 13 13:12:09 devx64 plasmashell[1006]: Could not find service for job "Job 1" with app name "org.kde.plasmashell"
Jul 13 13:12:09 devx64 plasmashell[1006]: qml:  totalCountChanged 0
Jul 13 13:12:09 devx64 plasmashell[1006]: Currrent active notifications: QHash()
Jul 13 13:12:09 devx64 plasmashell[1006]: Guessing partOf as: 0
Jul 13 13:12:09 devx64 plasmashell[1006]:  New Notification:  "Moving: Finished" "trash:/testfile" 0 & Part of: 0
Jul 13 13:12:09 devx64 plasmashell[1006]: qml:  totalCountChanged 1
Jul 13 13:12:10 devx64 kwin_x11[970]: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6554, resource id: 0, major code: 14 (
Jul 13 13:12:10 devx64 kwin_x11[970]: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6555, resource id: 0, major code: 14 (
Jul 13 13:12:10 devx64 kwin_x11[970]: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 6556, resource id: 0, major code: 14 (
Jul 13 13:12:10 devx64 kdeinit5[895]: log_kioremote: RemoteDirNotify::FilesChanged
Jul 13 13:12:10 devx64 kdeinit5[895]: log_kioremote: RemoteDirNotify::toRemoteURL( QUrl("desktop:/trash.desktop") )
Jul 13 13:12:10 devx64 kdeinit5[895]: log_kioremote: result => KUrl()
Jul 13 13:12:10 devx64 kdeinit5[895]: log_kioremote: RemoteDirNotify::FilesChanged
Jul 13 13:12:10 devx64 kdeinit5[895]: log_kioremote: RemoteDirNotify::toRemoteURL( QUrl("desktop:/trash.desktop") )
Jul 13 13:12:10 devx64 kdeinit5[895]: log_kioremote: result => KUrl()
Jul 13 13:12:10 devx64 kdeinit5[895]: log_kioremote: RemoteDirNotify::FilesAdded
Jul 13 13:12:10 devx64 kdeinit5[895]: log_kioremote: RemoteDirNotify::toRemoteURL( QUrl("desktop:/") )
Jul 13 13:12:10 devx64 kdeinit5[895]: log_kioremote: result => KUrl()
*****
But again, AFTER the first attempt, recreating that file and dragging it to the trash only took 1 second.
Comment 31 Leslie Zhai 2016-07-14 03:39:14 UTC
Hi guys, here comes Shift+Del and F2 https://git.reviewboard.kde.org/r/128444/
Comment 32 Leslie Zhai 2016-07-14 03:58:28 UTC
Hi Janek and vindicator,

Eike fixed relative issue (Resolve .desktop URLs in drop-on-item) about moving to trash last year https://bugs.kde.org/show_bug.cgi?id=354484

diff is here: https://quickgit.kde.org/?p=plasma-desktop.git&a=blobdiff&h=618d9a51b1e62ae064248abe6ffeb4cf3b08f31a&hp=ae886bad540178a7c7b874ffed8eda4018de2f6a&hb=1b37262d13b40193eb755af9c3a9bff2d2bcec1a&f=containments%2Fdesktop%2Fplugins%2Ffolder%2Ffoldermodel.cpp

I can not reproduce the SLOW moving to trash issue, but I will DOUBLE check KIO's DropJob usage.

Regards,
Leslie Zhai
Comment 33 Janek Bevendorff 2016-07-14 06:25:07 UTC
It's always been 5 seconds for me on new files, sometimes a little more.
I haven't experienced a minute or more but trust me, 5 seconds are
annoying enough. And the desktop notification is annoying me too,
especially because it doesn't really go away once the file is in the
trash. I still always see a circle with a "1" in it in my tray until I
click it away.
Comment 34 Leslie Zhai 2016-07-14 06:49:47 UTC
> new files

Hi Janek, I cp -r plasma-desktop-5.7.1 (368 directories, 5182 files) to ~/Desktop/ then move to Trash, it is not able to reproduce the issue...

Do you mean Empty the Trash cost 5+ seconds?
Comment 35 Janek Bevendorff 2016-07-14 08:22:46 UTC
No, I mean that moving a file to the trash takes that long. While it's
being moved, I see a progress notification and then after that a
persistent notification "Moving: finished" which stays as a (1)
indicator in the system tray until I manually click it away. It usually
only happens the first time I move something to the trash. After that
the move is instant (most of the time at least).
Comment 36 Leslie Zhai 2016-07-14 09:26:56 UTC
> After that
the move is instant (most of the time at least).

so it is difficult to reproduce the issue too for you!?
Comment 37 Janek Bevendorff 2016-07-14 15:00:30 UTC
No, I can reproduce it at least once after a fresh reboot.
Comment 38 vindicator 2016-07-22 22:29:55 UTC
Leslie and Janek, the latest build works for me regarding the time taken to move a file to the trash which I posted at https://bugs.kde.org/show_bug.cgi?id=331707#c5 (which is appropriate bug).

A single file was basically instant, while a folder full of subfolders/files (183) took maybe a couple seconds, but I think that is to be expected as the folders are traversed.

However this build didn't have the "shift-del" deletion for the files.
Comment 39 rmbg 2016-07-23 06:46:55 UTC
Leslie, your shift + delete patch works fine... 
any chance of having it in 5.7.3 build?
Comment 40 Leslie Zhai 2016-07-25 01:56:36 UTC
Hi rmbg,

It needs a configuration place for Shift+Del and F2 as suggested here https://git.reviewboard.kde.org/r/128444/ and I am learning 'Folder View settings page' without changing Qt...
Comment 41 Leslie Zhai 2016-07-25 07:17:04 UTC
Hi All,

please show our Shift+Delete desire to Qt developers ;-) https://bugreports.qt.io/browse/QTBUG-54926
Comment 42 vindicator 2016-07-25 11:11:19 UTC
Oooohhhh, I didn't know CTRL-D did anything.
I had been searching for "del" in kde keyboard shortcuts and only saw "Cut"  and "Delete Word".
I'm kind of OK with just using CTRL-D as it moves the item to the Trash, but I've always been accustomed to SHIFT-DEL completely deleting the file (bypassing Trash).
Comment 43 Leslie Zhai 2016-08-05 09:26:44 UTC
Git commit 825f59e3f46978e3d51b279fbe01b5707874c927 by Leslie Zhai.
Committed on 05/08/2016 at 08:49.
Pushed by lesliezhai into branch 'master'.

DeleteFile and RenameFile shortcut for FolderView.

ShortCut is a stopgap solution and should be dropped when Qt's
StandardKey gains support for these actions. please see QTBUG-54926
for more information.

REVIEW: 128444

M  +1    -0    CMakeLists.txt
M  +20   -7    containments/desktop/package/contents/ui/FolderView.qml
M  +3    -1    containments/desktop/plugins/folder/CMakeLists.txt
M  +1    -1    containments/desktop/plugins/folder/foldermodel.h
M  +2    -0    containments/desktop/plugins/folder/folderplugin.cpp
A  +54   -0    containments/desktop/plugins/folder/shortcut.cpp     [License: GPL (v2+)]
A  +55   -0    containments/desktop/plugins/folder/shortcut.h     [License: GPL (v2+)]

http://commits.kde.org/plasma-desktop/825f59e3f46978e3d51b279fbe01b5707874c927
Comment 44 rmbg 2016-09-06 13:53:49 UTC
Any news about qt support for standard actions?
Comment 45 Leslie Zhai 2016-09-07 02:58:22 UTC
HI rmbg,

*LOW* Priority ;-( https://bugreports.qt.io/browse/QTBUG-54926

a stopgap solution and should be dropped when Qt's StandardKey gains support for these actions https://git.reviewboard.kde.org/r/128444/ merged into UPSTREAM already ;-)

Regards,
Leslie Zhai
Comment 46 rmbg 2016-09-20 16:09:45 UTC
Hi, 
On Plasma 5.7.95 (Plasma 5.8 beta) seems to be fixed! Shift + del directly delete files or folders ("do you really want to delete these X items?")  and also ctrl + x cuts files or folder and let you paste where you want. 

Fantastic!
Comment 47 Leslie Zhai 2016-09-21 02:45:26 UTC
Hi rmbg,

You are welcome! and Happy birthday for KDE 20 years :-) https://timeline.kde.org/ thanks a lot for your test!

Regards,
Leslie Zhai
Comment 48 Gregor Mi 2018-03-25 17:04:52 UTC
The fix is shipped. Closing the bug.