The Qt::Key enum has no number pad specific numeric definitions. So how would one go about distinguishing between a number pressed on the number pad vs a number on the number row? I know the events at the OS level are different. Enter and Return on the other hand are separate keys.
Asked
Active
Viewed 521 times
1 Answers
1
Use keyPressEvent->modifiers().testFlag(Qt::KeypadModifier)
.

HiFile.app - best file manager
- 7,273
- 2
- 32
- 80
-
This was the correct path. I actually used a QKeyCombination(Qt::Key_7|Qt::KeypadModifier) for a QShortcut connected to a lambda slot – Evil Spork Jan 30 '22 at 05:45