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

WM_APPCOMMAND cannot be converted to Qt key event correctly

    XMLWordPrintable

Details

    Description

      I'm working on a media player project, and try to support media keys. It correctly generates Qt::Key_MediaPrevious, Qt::Key_MediaNext and Qt::Key_HomePage events. However, Qt::Key_MediaTogglePlayPause event won't show up when I press the play/pause media button, instead, it's Qt::Key_MediaPlay.
      Windows support media keys via WM_APPCOMMAND message, and it does generate APPCOMMAND_MEDIA_PLAY_PAUSE, APPCOMMAND_MEDIA_NEXTTRACK, APPCOMMAND_MEDIA_PREVIOUSTRACK and APPCOMMAND_BROWSER_HOME messages. I use nativeEventFilter() to filt these events out, but these media key events don't disappear. So it seems that Qt's media key events don't come from WM_APPCOMMAND message.
      I'm using a bluetooth headset. It works correctly in MPC-HC, which uses WM_APPCOMMAND message I think.

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            roywillow Roy Willow
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes