Due to a macOS peculiarity, it is necessary to handle KeypadModifier.
We do it unconditionnally, although only macOS seems to be affected.
"Note: On macOS, [...] The KeypadModifier value will also be set when
an arrow key is pressed as the arrow keys are considered part of the
keypad." (​https://doc.qt.io/qt-6/qt.html#KeyboardModifier-enum)
Related to bug #12572.
void GuiCommandEdit::keyPressEvent(QKeyEvent * e)
{
- if (e->modifiers() == Qt::NoModifier) {
+ if (e->modifiers() == Qt::NoModifier || e->modifiers() == Qt::KeypadModifier) {
switch (e->key()) {
case Qt::Key_Escape:
// emit signal