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

Shortcuts requiring but not specifying Shift fail on Mac

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.8.0 RC
    • 5.7.1
    • QPA
    • None
    • Mac OS X 10.9.5 on a 2011 13" MBP with a wired compact US English Apple Keyboard, by default using the Canadian English keymap.
    • macOS

    Description

      QAction shortcuts of the type Command+! or Command+< (US/Canadian English keymap) or Command+1 (French keymap) that require the Shift modifier but don't specify it explicitly always worked reliably. Qt 5.7.1 introduced a regression for me which causes these shortcuts to fail when the QAction is not attached to a menu in the native menubar.

      The workaround versions spelling out the shortcut in keymap-specific keystrokes still work (resp. Command+Shift+1 Command+Shift+ Command+Shift+&).

      I have adapted the "menus" example to serve as a demonstrator; it adds a "shortcut test action" to the menubar and/or the context menu:
      https://github.com/RJVB/shortcut-test-qt5
      By default the action has the Command+< shortcut and is added to the menubar in native mode plus to the context menu. In this configuration the shortcut works for me
      Launching the app with either `-no-native-menubar` (use an in-window menubar) and/or with `-no-shortcut-test-in-menubar` (don't add the test action to the menubar) renders the shortcut inoperable for me.
      The shortcut can be selected via the `--shortcut` option.

      See also bug #57990 .

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.graphics.and.multimedia Qt Graphics Team
              rjvbertin René Bertin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes