0

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.

Evil Spork
  • 1,013
  • 2
  • 10
  • 16

1 Answers1

1

Use keyPressEvent->modifiers().testFlag(Qt::KeypadModifier).

  • 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