Bug 323960 - Add a shortcut for copying current directory.
Summary: Add a shortcut for copying current directory.
Status: REOPENED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 16.12.2
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-24 09:07 UTC by Yichao Zhou
Modified: 2020-09-13 02:44 UTC (History)
5 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 Yichao Zhou 2013-08-24 09:07:54 UTC
Add a shortcut for copying current directory.  That is the most used operation I used for editable location!

Reproducible: Always
Comment 1 Frank Reininghaus 2013-08-24 17:58:04 UTC
Thanks for the suggestion, but I really don't see what is missing from your point of view. If you switch to "Editable location", the text is selected already, and pressing Ctrl+C copies it.

If the text is not selected yet, you have to press Ctrl+A and Ctrl+C. Is that really so inconvenient that you need a special new shortcut?
Comment 2 Christoph Feck 2013-08-24 21:34:52 UTC
The point of this report is to create a shortcut for this operation so that it is no longer necessary to temporarily switching to the Editable Location mode.

If you need the current URL into the clipboard, you need to press F6, Ctrl+A, Ctrl+C, Esc. That's already four keystrokes.

This report does not belong to kfile, because the URL navigator usually does not have focus, unless it is already in Editable Location mode, so it cannot be fixed there. If this is to be solved by a window-global shortcut, it has to be solved within the application.

If you do not want to add the operation in Dolphin, please close as WONTFIX.
Comment 3 Frank Reininghaus 2013-08-25 07:14:06 UTC
Sorry for not understanding the wish correctly (probably the word "editable location" confused me), and thanks for the clarification, Christoph!

(In reply to comment #2)
> If you need the current URL into the clipboard, you need to press F6,
> Ctrl+A, Ctrl+C, Esc. That's already four keystrokes.

3 are sufficient: Ctrl+L, Ctrl+C, Esc.

I see that it could be made easier with a new shortcut, but this is one of the cases where I wonder if this feature is really useful enough that it justifies adding code which must be maintained in the future, and adding another action that makes the shortcuts dialog harder to use (I admit that it's a big mess not not very useable already).

> If you do not want to add the operation in Dolphin, please close as WONTFIX.

I would suggest to discuss the issue at KDE Brainstorm:

http://forum.kde.org/viewforum.php?f=83

bugs.kde.org is basically useless for the discussion of new features and for finding out how much demand there is. If the idea gets a lot of support at KDE Brainstorm, and someone is willing to implement the feature, then we could add it.
Comment 4 Christoph Feck 2013-08-25 08:51:46 UTC
Looks like somebody read this, and created http://kde-apps.org/content/show.php/Copy+full+path?content=160417

Now, if there would be a way to set shortcuts on service menu entries ...
Comment 5 Frank Reininghaus 2013-08-25 10:19:53 UTC
(In reply to comment #4)
> Now, if there would be a way to set shortcuts on service menu entries ...

Yes, you're right. This is not the first time that it seems that "service menu shortcuts" could make it much easier to customize Dolphin.

However, I'm not sure if there is a straightforward way to implement such a thing. The QActions for the service menus are loaded dynamically when the context menu is shown, so we cannot really assign a shortcut to these actions in advance. One would need some kind of "proxy action", which loads and invokes the real action when the shortcut is pressed.

Moreover, the available service menus depend on the type(s) of the selected files, and some of the actions even require some custom code to be executed to determine which actions to show (if they are implemented as KAbstractFileItemActions).
Comment 6 Yichao Zhou 2013-09-07 08:19:50 UTC
Well, If we can add this feature as shortcut "Ctrl+Shift+C", we can also have "Ctrl+Shift+V", enter the url provided in the clip.
Comment 7 Yichao Zhou 2014-01-28 15:52:06 UTC
Implemented in https://git.reviewboard.kde.org/r/115357/
Comment 8 Julian Steinmann 2018-03-31 14:46:53 UTC
We have all information & a patch would even be available. I'll set the status to CONFIRMED, but we still need to consider whether this feature makes sense to implement or not.
Comment 9 nyanpasu64 2020-09-13 02:39:29 UTC
I think this has been fixed in 86e3b82e on Jun 29, 2020 (https://github.com/KDE/dolphin/commit/86e3b82efbbcdb287773cdaf6a5f4c1c22bb9fc6).
Comment 10 nyanpasu64 2020-09-13 02:44:54 UTC
Sorry, the commit I sent copies the first selected item, not the current directory's path. So this issue is not resolved.

Nonetheless, that functionality has now occupied the "Ctrl+Shift+C" shortcut, so it can't be used for copying the current directory.