Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.3.1
-
None
-
Windows 8.1 + MSVC 2013 + bluetooth headset
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.