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

Windows: Shortcuts with Qt::Key_MediaNext and Qt::Key_MediaPrevious are sent 2 times ( VK_MEDIA_NEXT_TRACK)

    XMLWordPrintable

Details

    • 34af9fa0dc38ec19d85c0ef2464715b1e9661233 (qtbase/5.12, 28.9.2018, 5.12.0)

    Description

      • Using Microsoft Mouse and Keyboard Center, reprogram one key (eg Mail) to trigger "SKip to next media track"
      • A shortcut containing the keys Qt::Key_MediaNext or Qt::Key_MediaPrevious is called 2 times instead of just once.

      A simple way to see this issue:

      #include <QtWidgets>
      int main(int argc, char **argv)
      {
      QApplication app(argc, argv);
      QDialog *dialog = new QDialog();
      QShortcut *shortcut = new QShortcut(dialog);
      shortcut->setKey(Qt::Key_MediaNext);
      QObject::connect(shortcut, &QShortcut::activated, []() {
              qDebug() << "shortcut activated";
      });
      dialog->show();
      return app.exec();
      }
      

       

       

      The result when the key is pressed:

      shortcut activated
      shortcut activated

      Attachments

        1. qtbug62828_log.txt
          2 kB
        2. qtbug62838_diag.diff
          7 kB
        3. qtbug62838_diag2.diff
          4 kB
        4. qtbug62838.zip
          2 kB

        Issue Links

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

          Activity

            People

              kleint Friedemann Kleint
              oamusic Olivier CLERO
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes