Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-53804

[REG: 5.3-5.6] Many shortcuts don't work on OSX when Japanese input sources are used

    XMLWordPrintable

Details

    • macOS
    • 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

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

          Activity

            People

              andysh Andy Shaw
              jirauser26727 user-04d21 (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes