Add a keyboard shortcut to create file
Needs RevisionPublic

Authored by thsurrel on Oct 24 2018, 8:00 PM.

Details

Reviewers
elvisangelaccio
aacid
Group Reviewers
Dolphin
Plasma
VDG
Summary

Like the existing F10 shortcut to create directories, this patch
adds a new shortcut to create files. The proposed default is Shift-F10.

Depends on D16412

FEATURE: 387762

Test Plan

Open Dolphin and hit Shift-F10.

Diff Detail

Repository
R318 Dolphin
Branch
arc_newfileshortcut (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5358
Build 5376: arc lint + arc unit
thsurrel created this revision.Oct 24 2018, 8:00 PM
Restricted Application added a project: Dolphin. · View Herald TranscriptOct 24 2018, 8:00 PM
Restricted Application added a subscriber: kfm-devel. · View Herald Transcript
thsurrel requested review of this revision.Oct 24 2018, 8:00 PM
thsurrel edited the test plan for this revision. (Show Details)Oct 24 2018, 8:01 PM
elvisangelaccio added inline comments.
CMakeLists.txt
11 ↗(On Diff #44179)

FYI: there is no time for KF5 5.52 (released on November 10th) in Applications 18.12 (dependency freeze is on November 8th).

If you want to ship this feature with 18.12, we'll have to go with #ifdefs

src/views/dolphinviewactionhandler.h
103

Please call it createFileTriggered() (I just pushed a patch that renames the createDirectory() signal).

thsurrel updated this revision to Diff 44200.Oct 25 2018, 7:30 AM

Renamed signal

thsurrel marked an inline comment as done.Oct 25 2018, 7:33 AM
thsurrel added inline comments.
CMakeLists.txt
11 ↗(On Diff #44179)

Than I think this can wait for 19.04. I will land this after 18.12 is released.

elvisangelaccio accepted this revision.Nov 25 2018, 10:27 AM

I don't have an opinion about the new shortcut, I'll leave that to the VDG team.

CMakeLists.txt
11 ↗(On Diff #44200)

Please rebase, we are already depending on 5.53 now.

This revision is now accepted and ready to land.Nov 25 2018, 10:27 AM
abetts added a subscriber: abetts.Nov 25 2018, 3:43 PM

I think this could make sense if you are also able to change the kind of file that you want to create.

This patch (together with D16412) links the shortcut to the first entry in the Create New list, and that list can be modified by adding entries: https://j605.tk/blog/post/shorts/new-templates-in-dolphin/
It is a feature not easy to discover but it exists :) There are some bugs open to improve the situation: https://bugs.kde.org/show_bug.cgi?id=400263.

I'm not super enthused about shift+F10 being the shortcut, but +1 on the feature!

What would be even better would be if the entire list were populated with keyboard shortcuts automatically, e.g. ctrl+shift+1, ctrl+shift+2, ctrl+shift+3, etc.

I'm not super enthused about shift+F10 being the shortcut, but +1 on the feature!

What would be even better would be if the entire list were populated with keyboard shortcuts automatically, e.g. ctrl+shift+1, ctrl+shift+2, ctrl+shift+3, etc.

@thsurrel are you planning to land this, or did you find my idea above so intriguing that you started to work on that instead? :)

cfeck added a subscriber: cfeck.Jan 9 2019, 2:38 AM

What is the status of this patch? Is it ready for committing, or are changes planned?

This patch has to be reworked to implement Nate's idea, I am not totally sure how that will work though. I will need to modify KIO for that as well.

aacid requested changes to this revision.Jul 21 2019, 5:24 PM
aacid added a subscriber: aacid.

If the patch has to be reworked let's mark it as such so it does not show in the "this is approved but not commited" list of reviews

This revision now requires changes to proceed.Jul 21 2019, 5:24 PM