How to distinguish Left-Shift and Right-Shift in QShortcut ?
Unsolved
General and Desktop
-
wrote on 7 Mar 2024, 15:25 last edited by
Like this:
connect(new QShortcut(QKeySequence(Qt::SHIFT_Left + Qt::Key_Down), this), SIGNAL(activated()), this, SLOT(moveBottomDown())); -
Like this:
connect(new QShortcut(QKeySequence(Qt::SHIFT_Left + Qt::Key_Down), this), SIGNAL(activated()), this, SLOT(moveBottomDown()));wrote on 7 Mar 2024, 15:51 last edited by@sonichy said in How to distinguish Left-Shift and Right-Shift in QShortcut ?:
connect(new QShortcut(QKeySequence(Qt::SHIFT_Left + Qt::Key_Down), this), SIGNAL(activated()), this, SLOT(moveBottomDown()));
Unfortunately there is no difference in
QKey
between left and right shift. There is onlyQt::ShiftModifier
.In this topic here they suggest to use the OS native key codes / events.
2/2