Uploaded image for project: 'Qt'
  1. Qt
  2. 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)

    XMLWordPrintable

Details

    • macOS
    • 25b00c88b6fda2eecd9ff566ab44974136dabf51

    Description

      Note firstly that this bug is currently 'masked' by QTBUG-56085, which prevents shortcuts requiring Shift from working correctly on the Mac in any keyboard layout. However, this is a separate problem, specific to Japanese (and any other layout that has no 'uchr' resource).

      STEPS TO REPRODUCE
      (0. Patch Qt to fix QTBUG-56085.)
      1. Build the attached application on OS X.
      2. Connect a Japanese keyboard.
      3. Switch to the Japanese 'Romaji' input source in the OS.
      4. Run the app. Observe that the menu has an entry with shortcut '*'.
      5. Ensure 'Application Output' is visible in Qt Creator.
      6. Press '*' (i.e. Shift+: on Japanese keyboard).

      EXPECTED: The app should write 'QKeySequence("*")' to the output.
      ACTUAL: Nothing happens.

      I dug into this one a bit. The underlying problem seems to be that the Japanese IME doesn't provide a 'uchr' resource, and so Qt's call to the UCTranslateKey API in qcocoakeymapper.mm fails. Qt then falls back to filling in the table for all the modifiers with the same character, the one from the key down event, in this case ':'.

      Not sure what the best fix is here but it's a very major problem for the Japanese version of our application.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              andysh Andy Shaw
              jlarcombe James Larcombe
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes