-
Bug
-
Resolution: Duplicate
-
P4: Low
-
5.7.1
-
None
-
Mac OS X
I spotted this whilst looking into QTBUG-57934. This is reproducible with stock 5.7.1.
STEPS TO REPRODUCE
1. Build the attached application on the Mac.
2. Ensure your current input source is a European one (I use British).
3. Run the app. A keyboard shortcut is registered in the menu for ':'.
4. Ensure the Application Output is visible in Qt Creator.
5. Plug in a Japanese keyboard.
6. Switch to the Japanese input source in the OS.
7. Press ':' (which requires no shift modified on this keyboard layout).
EXPECTED: 'QKeySequence(":")' is written to the application output, as it is if you click on the menu entry by hand.
ACTUAL: Nothing happens.
8. Now quit the app, but leave the input source set to Japanese.
9. Relaunch the app.
10. Press ':'
EXPECTED: 'QKeySequence(":")' is written to the application output
ACTUAL: This time it works.
This happens because there is no code in QCocoaKeyMapper::updateKeyboard() to clear the keyboard_layout_format.unicode and keyboard_mode variables if uchrData is null, as it is for the Japanese IME. So it will use the uchr table from the previously-selected input source, in this case British, and hence none of the shortcuts will work properly.