diff options
-rw-r--r-- | src/gui/kstandardshortcut.cpp | 5 | ||||
-rw-r--r-- | src/gui/kstandardshortcut.h | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/kstandardshortcut.cpp b/src/gui/kstandardshortcut.cpp index a91a2397..70fef713 100644 --- a/src/gui/kstandardshortcut.cpp +++ b/src/gui/kstandardshortcut.cpp @@ -167,6 +167,7 @@ static KStandardShortcutInfo g_infoStandardShortcut[] = { // https://commits.kde.org/kxmlgui/8eabbf6725386e716b7536c71a9181dfe5d959f0 { DeleteFile, "DeleteFile", QT_TRANSLATE_NOOP3("KStandardShortcut", "Delete", "@action"), SHIFT(Delete), 0, QList<QKeySequence>(), false, Category::File }, { RenameFile, "RenameFile", QT_TRANSLATE_NOOP3("KStandardShortcut", "Rename", "@action"), Qt::Key_F2, 0, QList<QKeySequence>(), false, Category::File }, + { CreateFolder, "CreateFolder", QT_TRANSLATE_NOOP3("KStandardShortcut", "Create Folder", "@action"), Qt::Key_F10, 0, QList<QKeySequence>(), false, Category::File }, { MoveToTrash, "MoveToTrash", QT_TRANSLATE_NOOP3("KStandardShortcut", "Move to Trash", "@action"), Qt::Key_Delete, 0, QList<QKeySequence>(), false, Category::File }, { Donate, "Donate", QT_TRANSLATE_NOOP3("KStandardShortcut", "Donate", "@action"), 0, 0, QList<QKeySequence>(), false, Category::Help }, { ShowHideHiddenFiles, "ShowHideHiddenFiles", QT_TRANSLATE_NOOP3("KStandardShortcut", "Show/Hide Hidden Files", "@action"), CTRL(H), ALT(Period), QList<QKeySequence>(), false, Category::View }, @@ -575,6 +576,10 @@ const QList<QKeySequence> &renameFile() { return shortcut(RenameFile); } +const QList<QKeySequence> &createFolder() +{ + return shortcut(CreateFolder); +} const QList<QKeySequence> &moveToTrash() { return shortcut(MoveToTrash); diff --git a/src/gui/kstandardshortcut.h b/src/gui/kstandardshortcut.h index 89d1fe9b..46885e28 100644 --- a/src/gui/kstandardshortcut.h +++ b/src/gui/kstandardshortcut.h @@ -139,6 +139,7 @@ enum StandardShortcut { AboutKDE, ///< Display the About KDE dialog. DeleteFile, ///< Permanently delete files or folders. @since 5.25 RenameFile, ///< Rename files or folders. @since 5.25 + CreateFolder, ///< Create a folder. @since 5.74 MoveToTrash, ///< Move files or folders to the trash. @since 5.25 Donate, ///< Open donation page on kde.org. @since 5.26 ShowHideHiddenFiles, ///< Toggle showing or hiding hidden files @since 5.70 @@ -549,6 +550,13 @@ KCONFIGGUI_EXPORT const QList<QKeySequence> &deleteFile(); KCONFIGGUI_EXPORT const QList<QKeySequence> &renameFile(); /** + * Create a folder. Default: F10 + * @return the shortcut of the standard accelerator + * @since 5.74 + */ +KCONFIGGUI_EXPORT const QList<QKeySequence> &createFolder(); + +/** * Moves files or folders to the trash. Default: Delete * @return the shortcut of the standard accelerator * @since 5.25 |