From 5f6dc8cdfce1a55fdde172facd462d76d19030e7 Mon Sep 17 00:00:00 2001 From: "J.D. Purcell" Date: Thu, 5 Oct 2023 19:44:40 -0400 Subject: [PATCH] Edit default shortcuts --- src/shortcutmanager.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/shortcutmanager.cpp b/src/shortcutmanager.cpp index a8bd2b79..81eacde5 100644 --- a/src/shortcutmanager.cpp +++ b/src/shortcutmanager.cpp @@ -63,13 +63,16 @@ void ShortcutManager::initializeShortcutsList() // ctrl+r for renaming, unless it conflicts with refresh (i.e. reload file) if (!QKeySequence::keyBindings(QKeySequence::Refresh).contains(QKeySequence(Qt::CTRL | Qt::Key_R))) shortcutsList.last().defaultShortcuts << QKeySequence(Qt::CTRL | Qt::Key_R).toString(); - // cmd+enter for renaming, mac-style +#ifdef Q_OS_MACOS + // cmd+enter shortcutsList.last().defaultShortcuts.prepend(QKeySequence(Qt::CTRL | Qt::Key_Return).toString()); +#endif shortcutsList.append({tr("Move to Trash"), "delete", keyBindingsToStringList(QKeySequence::Delete), {}}); - // cmd+backspace for deleting, mac-style +#ifdef Q_OS_MACOS + // cmd+backspace shortcutsList.last().defaultShortcuts.prepend(QKeySequence(Qt::CTRL | Qt::Key_Backspace).toString()); -#ifdef Q_OS_WIN +#elif defined Q_OS_WIN shortcutsList.last().readableName = tr("Delete"); #endif shortcutsList.append({tr("Delete Permanently"), "deletepermanent", QStringList(QKeySequence(Qt::SHIFT | Qt::Key_Delete).toString()), {}});