summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qt_cocoa_helpers_mac.mm
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-03-16 12:02:05 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-03-16 12:22:28 (GMT)
commitb2e9757b6481be20485d4a36f2d74ea919ff8833 (patch)
tree6e5af8f215e6eb3883748b79da727a69642e31ae /src/gui/kernel/qt_cocoa_helpers_mac.mm
parentbcfc1ac6d87d68e7fecb88802b80cad1600c1e35 (diff)
downloadQt-b2e9757b6481be20485d4a36f2d74ea919ff8833.zip
Qt-b2e9757b6481be20485d4a36f2d74ea919ff8833.tar.gz
Qt-b2e9757b6481be20485d4a36f2d74ea919ff8833.tar.bz2
Keypress events ignored in listview on Cocoa (64 Bit) with Japanese IME
When appliction is started with a Japanese input method, the keyboard layout data might not be avialble. In such cases use the unicode passed with the NSEvent. Also add key mappping support for the unicode range U+f700 to U+f747 Task-number: QTBUG-8647 Reviewed-by: Denis
Diffstat (limited to 'src/gui/kernel/qt_cocoa_helpers_mac.mm')
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
index 3fbd978..24fe5f7 100644
--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm
+++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm
@@ -684,7 +684,9 @@ bool qt_dispatchKeyEvent(void * /*NSEvent * */ keyEvent, QWidget *widgetToGetEve
EventRef key_event = static_cast<EventRef>(const_cast<void *>([event eventRef]));
Q_ASSERT(key_event);
if ([event type] == NSKeyDown) {
- qt_keymapper_private()->updateKeyMap(0, key_event, 0);
+ NSString *characters = [event characters];
+ unichar value = [characters characterAtIndex:0];
+ qt_keymapper_private()->updateKeyMap(0, key_event, (void *)&value);
}
// Redirect keys to alien widgets.