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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9
    • 4.8.5, 5.2.0, 5.2.1
    • None
    • 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.
    • macOS
    • 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

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

        Activity

          People

            dedietri Gabriel de Dietrich (drgvond)
            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