[Mac] Fix modifier reporting issue in the key events
This issue was introduced when porting key handling code from Qt4 to Qt5. To conform to the implementation of QKeyEvent::modifiers() we have to invert modifier state logic before sending them as QKeyEvents. Task-number: QTBUG-31332 Change-Id: I3bb41169f8ab2a4b0a13a224bb461d2792d3a65f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
This commit is contained in:
parent
23214c815e
commit
58a4bf2c99
@ -1036,7 +1036,7 @@ static QTouchDevice *touchDevice = 0;
|
|||||||
timestamp,
|
timestamp,
|
||||||
(lastKnownModifiers & mac_mask) ? QEvent::KeyRelease : QEvent::KeyPress,
|
(lastKnownModifiers & mac_mask) ? QEvent::KeyRelease : QEvent::KeyPress,
|
||||||
modifier_key_symbols[i].qt_code,
|
modifier_key_symbols[i].qt_code,
|
||||||
qmodifiers);
|
qmodifiers ^ [QNSView convertKeyModifiers:mac_mask]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user