Cocoa: Handle keyboard dead keys correctly
authorBradley T. Hughes <bradley.hughes@nokia.com>
Tue, 22 May 2012 11:41:50 +0000 (13:41 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 23 May 2012 12:18:34 +0000 (14:18 +0200)
commit19a6c50061ec2feb86895c6ffee500bf58c14809
tree57b14ed3c34f30f5c76419118794557457e9d043
parent321a5495101b769feb6dae1dcb703effc9e3bd52
Cocoa: Handle keyboard dead keys correctly

Some keyboard layouts have physical dead keys (like the ¨ key on a
Norwegian keyboard). These do not send any text, so we should not use
[NSString characterAtIndex:0] if the string is empty. When encountering
an empty [NSEvent character] string, use Qt::Key_unknown and
QChar::ReplacementCharacter.

Change-Id: I7281aa9ea6005341c0dcfa5900bfe601e4eac6a9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
src/plugins/platforms/cocoa/qnsview.mm