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

No key release event on Mac while the Command modifier is pressed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 4.8.5, 5.2.0, 5.2.1
    • Fix Version/s: 5.9
    • Labels:
      None
    • Environment:
      Tested on Mac, OSX 10.9.1, with Qt 4.8.5, 5.2.0, 5.2.1.

      The other modifiers (Shift, Control, Option) work correctly.
      No similar problem on Windows platform.
    • Platform/s:
      macOS
    • Commits:
      25e67bcacac690be4971cfab16cd838653d0e7c6

      Description

      On Mac, the Command (⌘) key prevents keyRelease events on regular keys.

      Follow this scenario, while listening to QWidget's keyPressEvent and keyReleaseEvent:
      1. Press down the command key
      2. Press down a regular key (say 'T')
      3. Release the 'T' key
      4. Release the command key

      Expected resulting sequence:
      1. keyPressEvent (command key)
      2. keyPressEvent (T key)
      3. keyReleaseEvent (T key)
      4. keyReleaseEvent (command key)

      Actual sequence:
      1. keyPressEvent (command key)
      2. keyPressEvent (T key)
      3. keyReleaseEvent (command key)

      The attached minimal application shows the problem.
      This is a problem when an application needs to track the set of pressed keys (not only modifier keys).

        Attachments

        For Gerrit Dashboard: QTBUG-36839
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            dedietri Gabriel de Dietrich (drgvond)
            Reporter:
            debunne Gilles Debunne
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes