From b2e9757b6481be20485d4a36f2d74ea919ff8833 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Tue, 16 Mar 2010 13:02:05 +0100 Subject: 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 --- src/gui/kernel/qt_cocoa_helpers_mac.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gui/kernel/qt_cocoa_helpers_mac.mm') diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm index 3fbd978515..24fe5f7d9e 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(const_cast([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. -- cgit v1.2.1