Global Media Keys Don't Work

Get answers about using MediaMonkey 4 for Windows.

Moderator: Gurus

Gyroscope352

Global Media Keys Don't Work

Post by Gyroscope352 »

Hi everyone,

I know this is a subject that has been talked about a lot on the forums, but after a few hours of searching and testing, I still have not seemed to fix it. Here's the deal:

I have a generic Rosewill keyboard that does not have any extra software or special drivers, but it does have media keys. I've set the media keys to their desired functions in MediaMonkey (next, previous, play/pause), and made them global. For awhile, everything was fine, until recently the Next key stopped working (most of the time).

I tried deleting and re-creating the shortcuts in Options > Hotkeys, but now the other keys are behaving the same way. If the desktop is focused, they don't work. If Chrome is focused, they don't work. They do work if Pidgin is focused (or if MediaMonkey is focused), but most of the time do not work at all.

If I set those shortcuts to other key combos or keys, they work fine--it's just the media keys themselves that don't seem to work.

Media keys work 100% fine in Spotify, no matter what other window is in focus. So it's a MediaMonkey-specific problem.

Setting the PreferLLKeysHook=1 flag in MediaMonkey.ini seems to do nothing.

Does anyone have an idea of what could be going on, and how to fix it? I'm at my wit's end a bit here.
Gyroscope352

Re: Global Media Keys Don't Work

Post by Gyroscope352 »

I seem to have fixed the problem just by deleting the registry key that houses your hotkey customizations. Not sure why that worked, but it did. You can find it at: HKEY_CURRENT_USER\Software\MediaMonkey\Hotkeys

That probably won't work for everyone, and you'll have to set up your hotkeys from scratch, but it worked for me...whatever the problem was.

Sorry to bother all!
605Scorpion
Posts: 6
Joined: Sun Sep 05, 2010 12:18 am

Re: Global Media Keys Don't Work

Post by 605Scorpion »

Gyroscope352 wrote:I seem to have fixed the problem just by deleting the registry key that houses your hotkey customizations. Not sure why that worked, but it did. You can find it at: HKEY_CURRENT_USER\Software\MediaMonkey\Hotkeys

That probably won't work for everyone, and you'll have to set up your hotkeys from scratch, but it worked for me...whatever the problem was.

Sorry to bother all!
Oh mai gaaaaawwwd...

Yo, thank you SO much. I was about throw thermite on all my computers. For some reason the same combination of mice, keyboards, drivers and Mediamonkey versions were yielding different results on my latest computer. I could not get Mediamonkey to respond to media buttons if Mediamonkey wasn't the app in focus. Deleting that registry directory fixed it! Thanks man!
variable

Re: Global Media Keys Don't Work

Post by variable »

YES!!! Worked like a charm!
Guest

Re: Global Media Keys Don't Work

Post by Guest »

It works indeed. They had stopped working after upgrading to MM 4.1.4.
Ptah

Re: Global Media Keys Don't Work

Post by Ptah »

Gyroscope352 wrote:I seem to have fixed the problem just by deleting the registry key that houses your hotkey customizations. Not sure why that worked, but it did. You can find it at: HKEY_CURRENT_USER\Software\MediaMonkey\Hotkeys

That probably won't work for everyone, and you'll have to set up your hotkeys from scratch, but it worked for me...whatever the problem was.

Sorry to bother all!
You are my hero!!! Thank you very much!
Earthlark
Posts: 9
Joined: Tue Mar 09, 2010 8:06 am

Re: Global Media Keys Don't Work

Post by Earthlark »

Gyroscope352 wrote:I seem to have fixed the problem just by deleting the registry key that houses your hotkey customizations. Not sure why that worked, but it did. You can find it at: HKEY_CURRENT_USER\Software\MediaMonkey\Hotkeys
Hm, just ran into this problem after a fresh install of Win 10 (on an HP Envy dv6) and MM 4.1.13.1801. Solution above fixed the problem. Thanks!
Daires1

Global Hotkeys not always working

Post by Daires1 »

Hello everyone!

I have a problem with global kotkeys. They work if windows or firefox and some other programs are focused, but if for example teamspeak or a game is focused, they do not work at all.

What I tried:
1. Deleted the hotkey regestry (http://www.mediamonkey.com/forum/viewto ... =1&t=77131)
Nothing happend. I did not even have to config my hotkeys again, they were still there.

2. Eddited MediaMonkey.ini and added PreferLLKeysHook=1
Again, nothing noticable happend. The problem is still there.

3. Eddited the hotkeys in MediaMonkey, changed from global to not global and back and also different hotkeys
The problem is still there.

4. Reinstalled MediaMonkeycompletly, as portable and normal
The problem is still there.

If I use windows media player, the hotkeys work every time in any program.
I´m on windows 10 and MediaMonkey 4.1.14.1813
I would appreciate any help!

Greatings Daires1
Peke
Posts: 17446
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Global Media Keys Don't Work

Post by Peke »

The only way it can happen and Have seen that when application uses Low Level Keys Hook and after non handling/handling it clears system flag that key is pressed.

Can you confirm that with http://www.happymonkeying.com/eSupport/hotkey.zip in background you still read key in games?
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Daires1

Re: Global Media Keys Don't Work

Post by Daires1 »

Hello Peke,

thank you for your reply.

The following is logged ingame after pressing the media key play/stop:

Code: Select all

--------
Device ID: 65576
HID_DATA[1]: 3CD00
Hotkey: 
--------
Device ID: 65576
HID_DATA[1]: 30000
Hotkey: 
--------
MediaMonkey does not react.

The following is logged in firefox after pressing the media key play/stop:

Code: Select all

-------
Device ID: 65576
HID_DATA[1]: 3CD00
Hotkey: 
--------
Keyboard ID: 0
Pressed Key: MEDIA PLAY PAUSE
VKey ID: 00B3
State Flags: 0002
HotKey: MEDIA PLAY PAUSE
--------
Device ID: 65576
HID_DATA[1]: 30000
Hotkey: 
--------
Keyboard ID: 0
Pressed Key: MEDIA PLAY PAUSE
VKey ID: 00B3
State Flags: 0003
HotKey: MEDIA PLAY PAUSE
MediaMonkey does react.

The following is logged on desktop after pressing the media key play/stop:

Code: Select all

--------
Keyboard ID: 0
Pressed Key: MEDIA PLAY PAUSE
VKey ID: 00B3
State Flags: 0002
HotKey: MEDIA PLAY PAUSE
--------
Keyboard ID: 0
Pressed Key: MEDIA PLAY PAUSE
VKey ID: 00B3
State Flags: 0003
HotKey: MEDIA PLAY PAUSE
MediaMonkey does react.

The following is logged in teamspeak after pressing the media key play/stop:

Code: Select all

--------
Device ID: 65576
HID_DATA[1]: 3CD00
Hotkey: 
--------
Device ID: 65576
HID_DATA[1]: 30000
Hotkey: 
MediaMonkey does not react.

The following is logged in uplay after pressing the media key play/stop:

Code: Select all

--------
Device ID: 65576
HID_DATA[1]: 3CD00
Hotkey: 
--------
Device ID: 65576
HID_DATA[1]: 30000
Hotkey: 
MediaMonkey does react.

Also interesting, if the key logger is focused:

Code: Select all

--------
Device ID: 65576
HID_DATA[1]: 3CD00
Hotkey: 
--------
Keyboard ID: 0
Pressed Key: MEDIA PLAY PAUSE
VKey ID: 00B3
State Flags: 0002
HotKey: MEDIA PLAY PAUSE
--------
Param CMD: 14
Param: APPCOMMAND_MEDIA_PLAY_PAUSE
--------
Device ID: 65576
HID_DATA[1]: 30000
Hotkey: 
--------
Keyboard ID: 0
Pressed Key: MEDIA PLAY PAUSE
VKey ID: 00B3
State Flags: 0003
HotKey: MEDIA PLAY PAUSE
But MediaMonkey does not react.

And if I focus MediaMonkey itself the keylogger does not log any key but MediaMonkey reacts.

I for myself can not see a pattern here.
Peke
Posts: 17446
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Global Media Keys Don't Work

Post by Peke »

Hi,
Thx for testing, there is a pattern. Let me try to explain.

Code: Select all

Device ID: HARDWARE ID 
HID_DATA[1]: HARDWARE RAW Data sent by Device Event (in this case key press, but can be different depending on device)
Hotkey: HOTKEY TRANSLATION OF HID_DATA[1] Driver based 
Keyboard ID: ID of Keyboard in case of multiple keyboards (If you add external NUMPAD to Laptop or BARCODE Reader for example) so that system knows which keyboard sent key
Pressed Key: MEDIA PLAY PAUSE (System Command name Sent for pressed key) 
VKey ID: 00B3 (SYSTEM KEY ID)
State Flags: 0002 (Event state that sent KEY Values eg. On Press/Release)
HotKey: MEDIA PLAY PAUSE (Actual KEY Pressed)
Now pattern:
Ingame: Game locks keyboard events on driver Level so only RAW DATA is passed which is then sent to driver -> Handled by GAME -> Cleared so that game waits for next command and No command is passed to system to be handled. This approach lowers response LAG but locks out other apps
Firefox: Same as ingame, but as Firefox is not set to handle that key it then forward to system that sends wide event to handle HOTKEY and that is why MMW reacts
Desktop: System handles RAW DATA Directly and translate it to Keyboard events and MMW knows that it needs to react
teamspeak: Same as Ingame in order to work ingame teamspeak handle the Key like ingame and as Focused APP (GAME) also gets same event it works. Only way to override ingame and have Push to talk work.
uplay: After handling hotkey it forwards the key to Registered apps (eg. MediaMonkey) which should handle the key. Logger is not registered application for any key but global event watcher
Logger: Focused command param receive to execute assigned System Command APPCOMMAND_MEDIA_PLAY_PAUSE and Handle it. It is SET in logger to report Key handled instead forward the command like Firefox, and MMW comply with that rule and do not react (eg. Command handled in other application do not execute)
MMW: Logger is disabled to fetch any key MMW already handled.

Hope I cleared things a bit.

Have you tried to have teamspeak in background and MMW focused, keys should work.

Personally I find Ingame and teamspeak behavior a hack workaround to ensure working and low LAG but I can relate why they done that in such manner.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Daires1

Re: Global Media Keys Don't Work

Post by Daires1 »

Thank you again Peke for the detailed answer.

I understand the problem now and I tested the hotkeys with teamspeak in the background, they work. This is fine to me, but is there any solution to make them also work in a focused game?
Windows Media Player works ingame, so I would assume it is possible or does it handle hotkeys differently than MediaMonkey?

Greetings!
Peke
Posts: 17446
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Global Media Keys Don't Work

Post by Peke »

Hi,
A bump to the topic. I've found that WMP actually do not comply with any rules Microsoft put in the first place eg. simple it reacts on all media keys regardless Active application is handling the key or not so if I have for example started WMP, AIMP and MMW all having paused playback no matter if AIMP or MMW are active WMP reacts on Play/Pause Key even Active application already handled the key, which is not case with both AIMP and MMW which reacts according to rules that if Active application handle key then app in background do not execute it.

Why I was not surprised about the result.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
RandomEngy
Posts: 32
Joined: Fri Aug 10, 2007 11:12 am

Re: Global Media Keys Don't Work

Post by RandomEngy »

I noticed that MediaMonkey ignores the play button when Visual Studio is active, but Spotify hears it. Spotify also hooks into the native Windows "Now playing" overlay UI. It also seems to behave better when both MediaMonkey and Spotify are open:

MediaMonkey in foreground and Spotify in background: MediaMonkey plays but Spotify doesn't do anything
Spotify in foreground and MediaMonkey in background: Both Spotify and MediaMonkey play at the same time

It would be really nice if you could have MediaMonkey act more like Spotify. I have Visual Studio open all the time and it drives me crazy that I can't use the keyboard to play and pause while working.
Peke
Posts: 17446
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Global Media Keys Don't Work

Post by Peke »

If MMW reacts while Spotify is foreground it looks like Spotify do not report MediaKey handled and MMW pick it up.

Re visual studio, See if you can disable low level keyboard hook in VS, I have had similar issue in Delphi in teh past when PLAY/PAUSE was assigned to Break app execution to debug.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
Post Reply