Cocoa: Fix regression in key handling

The text should be empty when Cmd key is in modifiers.

Task-number: QTBUG-36281
Change-Id: Ic71e532695ad4a947c86e8d21ae864d70f9afa4c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
bb10
Liang Qi 2014-10-27 12:20:50 +01:00
parent 100ed0c01d
commit 933fab137d
1 changed files with 1 additions and 1 deletions

View File

@ -1393,7 +1393,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
QString text;
// ignore text for the U+F700-U+F8FF range. This is used by Cocoa when
// delivering function keys (e.g. arrow keys, backspace, F1-F35, etc.)
if (ch.unicode() < 0xf700 || ch.unicode() > 0xf8ff)
if (!(modifiers & (Qt::ControlModifier | Qt::MetaModifier)) && (ch.unicode() < 0xf700 || ch.unicode() > 0xf8ff))
text = QCFString::toQString(characters);
QWindow *focusWindow = [self topLevelWindow];