# HG changeset patch # User Matti Hamalainen # Date 1683621433 -10800 # Node ID 345571aae522c8c5a6ffa31cf31debb641089c27 # Parent 6f5d2028b8829a9e46bb64f2eb27f5e718c0f2bf Change + operator to | for defining keyboard shortcuts combinations and use correct keyboard modifiers instead of the actual key definitions for alt/ctrl. diff -r 6f5d2028b882 -r 345571aae522 src/main.cpp --- a/src/main.cpp Tue May 09 11:23:49 2023 +0300 +++ b/src/main.cpp Tue May 09 11:37:13 2023 +0300 @@ -321,7 +321,7 @@ setActivePerson(-1); // Keyboard shortcuts - new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this, SLOT(on_button_Quit_clicked())); + new QShortcut(QKeySequence(Qt::ControlModifier | Qt::Key_Q), this, SLOT(on_button_Quit_clicked())); new QShortcut(QKeySequence(Qt::Key_F10), this, SLOT(on_button_Quit_clicked())); new QShortcut(QKeySequence(Qt::Key_F5), this, SLOT(on_button_AddPerson_clicked())); @@ -332,20 +332,20 @@ new QShortcut(QKeySequence(QKeySequence::ZoomIn), this, SLOT(changeUIZoomIn())); new QShortcut(QKeySequence(QKeySequence::ZoomOut), this, SLOT(changeUIZoomOut())); - new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_0), this, SLOT(changeUIZoomReset())); - new QShortcut(QKeySequence(Qt::CTRL + Qt::KeypadModifier + Qt::Key_Plus), this, SLOT(changeUIZoomIn())); - new QShortcut(QKeySequence(Qt::CTRL + Qt::KeypadModifier + Qt::Key_Minus), this, SLOT(changeUIZoomOut())); - new QShortcut(QKeySequence(Qt::CTRL + Qt::KeypadModifier + Qt::Key_0), this, SLOT(changeUIZoomReset())); + new QShortcut(QKeySequence(Qt::ControlModifier | Qt::Key_0), this, SLOT(changeUIZoomReset())); + new QShortcut(QKeySequence(Qt::ControlModifier | Qt::KeypadModifier | Qt::Key_Plus), this, SLOT(changeUIZoomIn())); + new QShortcut(QKeySequence(Qt::ControlModifier | Qt::KeypadModifier | Qt::Key_Minus), this, SLOT(changeUIZoomOut())); + new QShortcut(QKeySequence(Qt::ControlModifier | Qt::KeypadModifier | Qt::Key_0), this, SLOT(changeUIZoomReset())); - new QShortcut(QKeySequence(Qt::ALT + Qt::Key_Return), this, SLOT(toggleFullScreen())); + new QShortcut(QKeySequence(Qt::AltModifier | Qt::Key_Return), this, SLOT(toggleFullScreen())); new QShortcut(QKeySequence(Qt::Key_PageUp), this, SLOT(selectRowPrev())); new QShortcut(QKeySequence(Qt::Key_PageDown), this, SLOT(selectRowNext())); - new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Return), this, SLOT(focusDebtEdit())); + new QShortcut(QKeySequence(Qt::ControlModifier | Qt::Key_Return), this, SLOT(focusDebtEdit())); - new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_P), this, SLOT(on_button_Print_clicked())); - new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_T), this, SLOT(on_button_ViewTransactions_clicked())); + new QShortcut(QKeySequence(Qt::ControlModifier | Qt::Key_P), this, SLOT(on_button_Print_clicked())); + new QShortcut(QKeySequence(Qt::ControlModifier | Qt::Key_T), this, SLOT(on_button_ViewTransactions_clicked())); // Check for latest successful backup time qint64 threshold = 7;