Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.6.0
-
OSX 10.11.5
-
-
25b00c88b6fda2eecd9ff566ab44974136dabf51
Description
To reproduce:
1) Add the language support as on the picture. But you can use a standard US/EU keyboard.
2) Select the Romaji language as active input
3) Run the attached sample.
It won't work because of step #2
Note: this worked in Qt 5.3.0
The root of the problem lies in QCocoaKeyMapper::updateKeyMap
(qcocoakeymapper.mm)
UCKeyTranslate returns "error" and qt_mac_get_key is called with "unicodeKey" as argument. The problem is that this value is not an unicode value but a Qt virtual key code, and this clashes with the table lookup 'qt_mac_keyboard_symbols'.
To solve the problem, I had to do several things:
- in qt_mac_get_key, check qt_mac_keyvkey_symbols before the rest, if UCKeyTranslate failed.
- Complement the table qt_mac_keyvkey_symbols with:
{ kVK_Delete, QT_MAC_MAP_ENUM(Qt::Key_Backspace) }, { kVK_ForwardDelete, QT_MAC_MAP_ENUM(Qt::Key_Delete) }, { kVK_Home, QT_MAC_MAP_ENUM(Qt::Key_Home) }, { kVK_End, QT_MAC_MAP_ENUM(Qt::Key_End) }, { kVK_F17, QT_MAC_MAP_ENUM(Qt::Key_F17) }, { kVK_F18, QT_MAC_MAP_ENUM(Qt::Key_F18) }, { kVK_F19, QT_MAC_MAP_ENUM(Qt::Key_F19) }, { kVK_F20, QT_MAC_MAP_ENUM(Qt::Key_F20) },
Attachments
Issue Links
- relates to
-
QTBUG-57934 For OS X input sources such as Japanese that have no 'uchr' resource, keyboard shortcuts requiring modifiers (such as shift) will not work correctly (Mac)
- Closed