diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-03-16 12:02:05 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2010-03-16 12:22:28 (GMT) |
commit | b2e9757b6481be20485d4a36f2d74ea919ff8833 (patch) | |
tree | 6e5af8f215e6eb3883748b79da727a69642e31ae /src/gui/kernel/qt_cocoa_helpers_mac.mm | |
parent | bcfc1ac6d87d68e7fecb88802b80cad1600c1e35 (diff) | |
download | Qt-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.mm | 4 |
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. |