Author Topic: Play/Pause Button inputs twice when Windows 10 Media Control Overlay is enabled.  (Read 19498 times)

alexdo

  • Newbie
  • *
  • Posts: 2
The whole problem is because of the media control "feature" that if you press a keyboard media key, the media control also simulates a click on its buttons. And the plugin defines the appropriate action for the buttons. So everything is executed two times - one from media control buttons callback and one from music bee global hotkey.

So here is a fixed plugin for everyone who wants to have working media control buttons and working global hotkeys:
http://www.mediafire.com/file/7fdiewd2r3df62i/mb_MediaControl.zip/file

The fix uses a keyboard key press hook that watches for keyboard media key presses and saves the time of the last press. And if last press is less than 1500 milliseconds ago the media control button press is ignored.

For everyone who doesn't trust me, here is the source to see what is done and compile it yourself:
http://www.mediafire.com/file/hfrflurmkonsv8f/MediaControlSource.zip/file
Last Edit: April 20, 2020, 10:04:58 PM by alexdo


xhtml

  • Newbie
  • *
  • Posts: 1
The whole problem is because of the media control "feature" that if you press a keyboard media key, the media control also simulates a click on its buttons. And the plugin defines the appropriate action for the buttons. So everything is executed two times - one from media control buttons callback and one from music bee global hotkey.

So here is a fixed plugin for everyone who wants to have working media control buttons and working global hotkeys:
http://www.mediafire.com/file/7fdiewd2r3df62i/mb_MediaControl.zip/file

The fix uses a keyboard key press hook that watches for keyboard media key presses and saves the time of the last press. And if last press is less than 1500 milliseconds ago the media control button press is ignored.

For everyone who doesn't trust me, here is the source to see what is done and compile it yourself:
http://www.mediafire.com/file/hfrflurmkonsv8f/MediaControlSource.zip/file
this is just working great.Thank you for giving us this awesome plug-in, if you delete shortcuts then when you don't have Windows media control overlay you cannot do those actions with shortcuts.
For anyone who is looking for solution,Just grab this awesome extension and enjoy

pseudonym

  • Guest
The whole problem is because of the media control "feature" that if you press a keyboard media key, the media control also simulates a click on its buttons. And the plugin defines the appropriate action for the buttons. So everything is executed two times - one from media control buttons callback and one from music bee global hotkey.

So here is a fixed plugin for everyone who wants to have working media control buttons and working global hotkeys:
http://www.mediafire.com/file/7fdiewd2r3df62i/mb_MediaControl.zip/file

The fix uses a keyboard key press hook that watches for keyboard media key presses and saves the time of the last press. And if last press is less than 1500 milliseconds ago the media control button press is ignored.

For everyone who doesn't trust me, here is the source to see what is done and compile it yourself:
http://www.mediafire.com/file/hfrflurmkonsv8f/MediaControlSource.zip/file

This works initially, but after the playlist ends, and then you press the MediaPlayPause key from outside MusicBee and the double event issue reappears. I think when a Media Control button event is first received, the Media hotkeys in MusicBee should be disabled, letting the Media Control handle and forward the events, until the playlist stop at which point the Media hotkeys in MusicBee are re-enabled until the next Media Control button event is fired. There is also the issue of other apps using the Media Controls and conflicting with the hotkeys.
Last Edit: May 24, 2020, 12:08:25 PM by pseudonym


ImFilippo

  • Newbie
  • *
  • Posts: 11
I downloaded the plugin but i also have the double input problem. Is there a remedy?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34344
I downloaded the plugin but i also have the double input problem. Is there a remedy?
try disabling the media keys in the Hotkeys preferences

ImFilippo

  • Newbie
  • *
  • Posts: 11
Quote
try disabling the media keys in the Hotkeys preferences

thanks this worked!  :)

getmusicbee_account1111

  • Jr. Member
  • **
  • Posts: 43
I just wanted to say that the controls on headphones don't seem to do the same thing as controls on a keyboard as for me, I currently only get the double clicking effect with my headphones and not my keyboard buttons.
Exactly the same behavior for me.
Bluetooth headset play/pause works great.
I've tried two different keyboards, and for both play/pause is detected twice.
Running MB 3.5.8150.