Fixup 89394bcd: handle cursor keys from keypad

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.
This commit is contained in:
Daniel Ramoeller 2023-03-17 21:45:36 +01:00 committed by Jean-Marc Lasgouttes
parent 6213fc3553
commit dfc3db773a

View File

@ -29,7 +29,7 @@ GuiCommandEdit::GuiCommandEdit(QWidget * parent)
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