mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-18 12:14:21 -05:00
Use Alt+Tab on macOS to switch between databases (#5407)
This commit is contained in:
parent
6a35bbea2f
commit
8a4a804c8c
@ -295,9 +295,14 @@ MainWindow::MainWindow()
|
|||||||
new QShortcut(Qt::CTRL + Qt::Key_M, this, SLOT(minimizeOrHide()));
|
new QShortcut(Qt::CTRL + Qt::Key_M, this, SLOT(minimizeOrHide()));
|
||||||
new QShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_M, this, SLOT(hideWindow()));
|
new QShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_M, this, SLOT(hideWindow()));
|
||||||
// Control database tabs
|
// Control database tabs
|
||||||
new QShortcut(Qt::CTRL + Qt::Key_Tab, this, SLOT(selectNextDatabaseTab()));
|
// Ctrl+Tab is broken on Mac, so use Alt (i.e. the Option key) - https://bugreports.qt.io/browse/QTBUG-8596
|
||||||
|
auto dbTabModifier2 = Qt::CTRL;
|
||||||
|
#ifdef Q_OS_MACOS
|
||||||
|
dbTabModifier2 = Qt::ALT;
|
||||||
|
#endif
|
||||||
|
new QShortcut(dbTabModifier2 + Qt::Key_Tab, this, SLOT(selectNextDatabaseTab()));
|
||||||
new QShortcut(Qt::CTRL + Qt::Key_PageDown, this, SLOT(selectNextDatabaseTab()));
|
new QShortcut(Qt::CTRL + Qt::Key_PageDown, this, SLOT(selectNextDatabaseTab()));
|
||||||
new QShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_Tab, this, SLOT(selectPreviousDatabaseTab()));
|
new QShortcut(dbTabModifier2 + Qt::SHIFT + Qt::Key_Tab, this, SLOT(selectPreviousDatabaseTab()));
|
||||||
new QShortcut(Qt::CTRL + Qt::Key_PageUp, this, SLOT(selectPreviousDatabaseTab()));
|
new QShortcut(Qt::CTRL + Qt::Key_PageUp, this, SLOT(selectPreviousDatabaseTab()));
|
||||||
|
|
||||||
// Tab selection by number, Windows uses Ctrl, macOS uses Command,
|
// Tab selection by number, Windows uses Ctrl, macOS uses Command,
|
||||||
|
Loading…
Reference in New Issue
Block a user