Author Topic: Stop Media Keys From Being Taken Over/Controlled Constantly By MusicBee?  (Read 972 times)

Hansuke

  • Newbie
  • *
  • Posts: 8
Is there a way to stop MusicBee from always responding to keyboard media keys on Windows 10?

For example, how every other program with media playing works is that it responds to media keys when it was the last program focused. However, MusicBee always responds to media keys even when it is minimized and wasn't brought into focus after i.e. Spotify or Youtube in Chrome.

In the native Windows media control overlay that shows up in the top left corner of the screen while using media keys, you can switch between what program is currently controlled by the media keys. Even with MusicBee not selected, it still takes over the media keys and they won't work with any other program as long as MusicBee is open.

I have noticed that bluetooth headphones' media controls do not have this problem and do work with the currently focused program.

I have also tried disabling the "Global" option for the media keys in the "Hotkeys" section in MusicBee preferences. It doesn't do anything to help alleviate this problem.

The biggest problem is that MusicBee pretty much "eats" the media key inputs and no other program responds to media keys anymorr as long as MusicBee is open.
Is there a way to stop MusicBee from hijacking the media controls? Besides closing MusicBee of course.

Last Edit: May 29, 2022, 10:26:49 AM by Hansuke

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
i agree if global is not ticked MB should only process the media key when in focus.
If you are using v3.4 desktop or portable you can try this version
https://getmusicbee.com/patches/MusicBee34_Patched.zip
unzip and replace the existing musicbee application files

MusicBebe

  • Jr. Member
  • **
  • Posts: 60
I find the same or very similar happening, and I am using a portable install of MB 3.5.8150 P.

I have removed the "global" option from all key assignments that come up when I type "media" into the Hotkeys search box.
When MB does not have the focus, if the F3 (Play/Pause media) key is pressed, MB starts playing, and if I press it again, MB stops but then immediately resumes playing, as though it is processing both a stop and a start command. The only way to get out of this loop is to focus MB and then use the regular Ctrl+S to stop playback. Pressing F3/media key in MB will stop and then immediately resume playback.

This is annoying because I use F3 all the time in various apps for "Find Next," and if the Fn mod key on my keyboard is not enabled (which can happen easily via a "typo" since it is located next to the Ctrl and Win key), MB starts playing when I try to do a search.

Any ideas? Is it possible that it is Windows that is passing the MediaKey to MB, and that MB is just responding to a Windows command independent of its own settings? I'm using a Surface Pro, with hardware keyboard attached.
Last Edit: May 29, 2022, 11:56:19 PM by MusicBebe

Hansuke

  • Newbie
  • *
  • Posts: 8
i agree if global is not ticked MB should only process the media key when in focus.
If you are using v3.4 desktop or portable you can try this version
https://getmusicbee.com/patches/MusicBee34_Patched.zip
unzip and replace the existing musicbee application files
Using this patched version and then turning off global for the media hotkeys causes the media keys to not be responsive anymore. No program, including MusicBee, respond to media keys after disabling the global option of the media hotkeys in MusicBee. It seems like MusicBee blocks the media keys from being read by other programs. Even though it is not in focus.

Turning back on global for the media hotkeys restores the same functionality of the media keys from before installing the patched version. Changing program focus still doesn't stop MusicBee from "eating" the media keys.

It's back to square one.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312

MusicBebe

  • Jr. Member
  • **
  • Posts: 60
MusicBeeBass.dll
Mod date: August 30, 2018, 12:24:44 pm.

That's for MB 3.5.8150.

Is that a prerelease? I see the download page is still offering MusicBee 3.4.8033.

MusicBebe

  • Jr. Member
  • **
  • Posts: 60

Using this patched version and then turning off global for the media hotkeys causes the media keys to not be responsive anymore. No program, including MusicBee, respond to media keys after disabling the global option of the media hotkeys in MusicBee. It seems like MusicBee blocks the media keys from being read by other programs. Even though it is not in focus.

The only way I was able to get MB to not respond to a play/pause media key was to delete all key assignments from the Multimedia: Play/Pause action. That was after unticking the global option.

I'll mention again, after MB responded to an out of focus play/pause media key, all subsequent presses of the key caused MB to stop and then immediately start again. I had to return focus to MB and stop with Ctrl+s (not sure if that's a default or my own.)

Turning them off this way is not a great loss to me as I tend not to use media keys, because I use regular function keys all the time, in different apps, plus with AHK, and their function can change depending on the state of the Fn mod key, and I would rather they do nothing when I accidentally misfire, which is easy to do because different keyboards map mediakey functions to different function keys.  ???

Thanks for this great program! So happy and even relieved to be able to use it, even with the quibbles!  :)

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
i see one place i missed for when local only keyboard handling is enabled, so could you try this version
https://getmusicbee.com/patches/MusicBee34_Patched.zip
make sure you also update MusicBeeBass.dll from the zip

Also if you are using the media control plugin then let me know as you will also need an updated version of that

Hansuke

  • Newbie
  • *
  • Posts: 8
what is the modification date of musicbeebass.dll ?
Modified Date: 6-18-2018    3:39 PM
i see one place i missed for when local only keyboard handling is enabled, so could you try this version
https://getmusicbee.com/patches/MusicBee34_Patched.zip
make sure you also update MusicBeeBass.dll from the zip

Also if you are using the media control plugin then let me know as you will also need an updated version of that
I have installed this one and unticking global for the media hotkeys does indeed work now. Media keys are no longer being "taken over" by MusicBee when MusicBee is open and out of focus.

However, I have noticed a new bug where MusicBee plays two separate tracks at the same time when using the media keys. This happened when I paused and then used the skip media keys. Now when I pause/play MusicBee, it plays two distinct tracks at the same time.

I am using the Media Control plugin. Could this be causing the problem therefore needing a patch?

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34312
I cant reproduce that. Was the skip key pressed really quickly after the pause and is it something you can reproduce?

Hansuke

  • Newbie
  • *
  • Posts: 8
I cant reproduce that. Was the skip key pressed really quickly after the pause and is it something you can reproduce?
Can't reproduce it after restarting MusicBee.

MusicBebe

  • Jr. Member
  • **
  • Posts: 60
Hi. I lost track of this thread, after whatever it was I did seemed to have solved the problem. But now I find that MB is again responding to media keys, or maybe I was mistaken about it having been solved, and I'm only now seeing it. In any case, I'd like to set that so that it never happens. I have disabled all mediakey actions as fully as possible.

I am still running MB 3.5.8150 P. Based on this....

Quote
i see one place i missed for when local only keyboard handling is enabled, so could you try this version
https://getmusicbee.com/patches/MusicBee34_Patched.zip
make sure you also update MusicBeeBass.dll from the zip

...should I then downgrade to 3.4? And do so by running that patch from inside the 3.5 folder?

Sorry if I'm retreading old ground.
Last Edit: June 10, 2022, 12:01:49 AM by MusicBebe

MusicBebe

  • Jr. Member
  • **
  • Posts: 60
hmm... well I just copied the contents of the zip file, including bass.dll, into (a copy of) my portable install, and that didn't do anything. MB still responded to pause/play, including globally. I confirmed that the media keys are still unassigned and that global is off.

Anything else I might do?  :(