Global Media Keys Don't Work

Get answers about using the current release of MediaMonkey for Windows.

Moderator: Gurus

Global Media Keys Don't Work

Postby Gyroscope352 » Mon Jul 14, 2014 1:26 pm

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

Postby Gyroscope352 » Thu Jul 17, 2014 11:41 am

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!
Gyroscope352
 

Re: Global Media Keys Don't Work

Postby 605Scorpion » Thu Aug 07, 2014 7:22 pm

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!
605Scorpion
 
Posts: 6
Joined: Sun Sep 05, 2010 12:18 am

Re: Global Media Keys Don't Work

Postby variable » Mon Sep 15, 2014 4:41 pm

YES!!! Worked like a charm!
variable
 

Re: Global Media Keys Don't Work

Postby Guest » Wed Oct 08, 2014 2:42 pm

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

Re: Global Media Keys Don't Work

Postby Ptah » Fri Mar 27, 2015 5:45 am

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!
Ptah
 

Re: Global Media Keys Don't Work

Postby Earthlark » Thu Aug 04, 2016 12:15 am

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!
Earthlark
 
Posts: 9
Joined: Tue Mar 09, 2010 8:06 am

Global Hotkeys not always working

Postby Daires1 » Sat Feb 11, 2017 7:59 am

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 (viewtopic.php?f=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
Daires1
 

Re: Global Media Keys Don't Work

Postby Peke » Sat Feb 11, 2017 5:08 pm

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,
Pavle
MM Core Developer and Admin of free MediaMonkey extensions Hosting
Image
Image
Peke
 
Posts: 10409
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia

Re: Global Media Keys Don't Work

Postby Daires1 » Sun Feb 12, 2017 11:38 am

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.
Daires1
 

Re: Global Media Keys Don't Work

Postby Peke » Sun Feb 12, 2017 7:15 pm

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,
Pavle
MM Core Developer and Admin of free MediaMonkey extensions Hosting
Image
Image
Peke
 
Posts: 10409
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia

Re: Global Media Keys Don't Work

Postby Daires1 » Mon Feb 13, 2017 2:02 pm

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!
Daires1
 

Re: Global Media Keys Don't Work

Postby Peke » Mon Feb 27, 2017 8:43 am

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,
Pavle
MM Core Developer and Admin of free MediaMonkey extensions Hosting
Image
Image
Peke
 
Posts: 10409
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia

Re: Global Media Keys Don't Work

Postby RandomEngy » Thu Nov 09, 2017 1:32 pm

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.
RandomEngy
 
Posts: 27
Joined: Fri Aug 10, 2007 11:12 am


Return to Need Help? (mmw)

Who is online

Users browsing this forum: Google [Bot] and 25 guests