SUMMARY There currently is a shortcut for creating folders (bug 155704), this can be very useful, and I think a shortcut for creating other files would be too. There are several default file creation actions in the Create New menu, and I think each one should get a shortcut: - Text file - Empty file - HTML file - Link to Location - Link to file or directory - Link to application These do not need to be enabled / defined by default, the user could choose to assign a key combination themselves.
[+1] for this. IMHO it is not necessary that there are shortcuts defined by default, but exposing these actions so that they can receive shortcuts would already help.
Talking about keywords, does this deserve the "junior-jobs" keyword?
I've been looking into how to add this myself, and it seems like this issue might be a duplicate: https://bugs.kde.org/show_bug.cgi?id=387762
Created attachment 177497 [details] New file shortcut patch progress I've managed to set up the development environment and add a shortcut, but `KNewFileMenu::createFile` seems to be hardcoded to use the first entry (`d->m_firstFileEntry`). https://api.kde.org/frameworks/kio/html/knewfilemenu_8cpp_source.html#l01524 Commit with changes: https://invent.kde.org/qazcetelic/dolphin/-/commit/5a00237b6ff48e6cca0d581d86ac023a4bfb934e
*** Bug 387762 has been marked as a duplicate of this bug. ***
(In reply to kde from comment #4) > Created attachment 177497 [details] > New file shortcut patch progress > > I've managed to set up the development environment and add a shortcut, but > `KNewFileMenu::createFile` seems to be hardcoded to use the first entry > (`d->m_firstFileEntry`). > https://api.kde.org/frameworks/kio/html/knewfilemenu_8cpp_source.html#l01524 > > Commit with changes: > https://invent.kde.org/qazcetelic/dolphin/-/commit/ > 5a00237b6ff48e6cca0d581d86ac023a4bfb934e Thanks for the patch! The next step is to create a merge request. In the MR, please add "Fixes: Bug 462899" so it gets linked to this report. https://community.kde.org/Infrastructure/GitLab#Submitting_a_merge_request If you want to discuss the development work, please reach out in our Matrix channel for new contributors https://community.kde.org/Get_Involved#New_Contributor?_Say_Hello_In_Matrix Thanks again.
.
I don't think it's ready for a merge request, since it creates a file of the first entry type instead of an empty file
In order for the patch to be accepted, it needs the work done to make it ready for a Merge Request. Unfortunately here on the bug tracker, we cannot offer help with software development. You can find appropriate ways to get in contact with the development team for assistance with your patch at https://community.kde.org/Get_Involved/development#Communicate_with_the_dev_team. Thanks for helping to make KDE software better!
Git commit f81d73a7f3a851dc755ef0cd1fd2a2507587a900 by Méven Car, on behalf of Christian Schwarz. Committed on 03/02/2025 at 18:23. Pushed by meven into branch 'master'. implement shortcut action for file creation M +4 -1 src/dolphincontextmenu.cpp M +20 -3 src/dolphinmainwindow.cpp M +1 -0 src/dolphinmainwindow.h M +2 -1 src/dolphinnewfilemenu.cpp M +1 -1 src/dolphinnewfilemenu.h M +4 -2 src/dolphinpart.cpp M +1 -0 src/settings/viewmodes/generalviewsettingspage.cpp M +74 -0 src/tests/dolphinmainwindowtest.cpp M +9 -1 src/views/dolphinviewactionhandler.cpp M +7 -0 src/views/dolphinviewactionhandler.h https://invent.kde.org/system/dolphin/-/commit/f81d73a7f3a851dc755ef0cd1fd2a2507587a900