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

Defining shortcuts for both Num+, and Num+. gives an ambiguous shortcut warning (and fails to work) when using the German keyboard layout (Windows only)

    XMLWordPrintable

Details

    • f7980f4eda0ab2d7684357fd28b40bf6bbed260f (qtbase/5.11, 25.4.2018, 5.11.1)

    Description

      This is similar to QTBUG-57938 but rather less important; a given keyboard will only have either a Num+. key or a Num+, key, so it's not useful to define both shortcuts. Nonetheless this was reported by a user of our application (we had inadvertently left the English shortcut defined in the German version).

      STEPS TO REPRODUCE
      1. Build and run the attached application on Windows.
      2. Connect a German keyboard and switch to the German keyboard layout in the OS.
      3. Observe that there are two menu entries, one with shortcut 'Num+.' and one with shortcut 'Num+,'.
      4. Ensure the Application Output is visible in Qt Creator.
      5. Press the ',' key on the numeric keypad.

      EXPECTED: The shortcut for Num+, is triggered.
      ACTUAL: An ambiguous shortcut for Num+. is reported in the app output.

      I tried to work out what was going on here; it seems as though the 'fallback' case in QWindowsKeyMapper is mapping the virtual code for this key (0x6E, VK_DECIMAL) to Qt::Key_Period, even though the keyboard layout correctly returns a comma. I couldn't really work out why this fallback was necessary.

      Attachments

        1. numpad-shortcut-test.zip
          2 kB
          James Larcombe
        2. qtbug57992_diag.diff
          5 kB
          Friedemann Kleint
        3. qtbug57992_log.txt
          1 kB
          Friedemann Kleint
        4. qtbug57992.zip
          2 kB
          Friedemann Kleint

        Issue Links

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

          Activity

            People

              kleint Friedemann Kleint
              jlarcombe James Larcombe
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes