mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-08-02 03:26:14 -04:00
Use Alt+Tab on macOS to switch between databases (#5407)
This commit is contained in:
parent
6a35bbea2f
commit
8a4a804c8c
1 changed files with 7 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue