diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index b917c2b..c4da36d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -196,7 +196,12 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) #endif fileMenu->addAction(tr("Copy marked files"), Qt::Key_F5, this, &MainWindow::copyMarked); fileMenu->addAction(tr("Move marked files"), Qt::Key_F6, this, &MainWindow::moveMarked); - fileMenu->addAction(tr("Move marked files to trash"), QKeySequence::Delete, this, &MainWindow::deleteMarked); + QAction *deleteAction = fileMenu->addAction(tr("Move marked files to trash"), QKeySequence::Delete, this, &MainWindow::deleteMarked); +#ifdef Q_OS_MACOS + deleteAction->setShortcuts(QList({Qt::Key_Backspace, QKeySequence::Delete})); +#else + deleteAction->setShortcuts(QKeySequence::Delete); +#endif fileMenu->addSeparator(); fileMenu->addAction(tr("Index directory"), this, static_cast(&MainWindow::indexDir)); fileMenu->addAction(tr("Reindex files"), this, &MainWindow::reindex);