Skip to content

Commit

Permalink
Edit default shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpurcell committed Oct 5, 2023
1 parent 8ca9791 commit 5f6dc8c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/shortcutmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()), {}});
Expand Down

0 comments on commit 5f6dc8c

Please sign in to comment.