[SOLVED] Global hotkeys / media keys don't work

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: [SOLVED] Global hotkeys / media keys don't work

Re: [SOLVED] Global hotkeys / media keys don't work

by Peke » Mon Apr 26, 2021 2:33 pm

notSure wrote: Mon Apr 26, 2021 2:28 pm This solved it for me in Firefox:
Change media.hardwaremediakeys.enabled to false in about:config preferences.
Good Catch.

Re: [SOLVED] Global hotkeys / media keys don't work

by notSure » Mon Apr 26, 2021 2:28 pm

This solved it for me in Firefox:
Change media.hardwaremediakeys.enabled to false in about:config preferences.

Re: [SOLVED] Global hotkeys / media keys don't work

by Peke » Tue Aug 04, 2020 7:33 pm

Hi,
OK, flagged it as SOLVED for now.

Re: Global hotkeys / media keys don't work

by Coincident » Tue Aug 04, 2020 5:42 pm

Peke wrote: Tue Aug 04, 2020 5:08 pm Hi,
I do not have a problem as I create Macro Hotkey in Logitech App. Do not have Asus ROG PC hardware except ASUS Routers (an MSI Fan) to test with ROG software.

But I really doubt that you can't create macro to execute external application like I can in Logitech software and not create Windows shortcut that you assign to ROG macro?

See how it looks on MY PC:
Hello.

That does look cool. Logitech's software might be more stable than ASUS' (for keyboards at least).
I probably could do the same with the ASUS ROG Armoury application; but since the app is very unstable, I choose to not install it again.
I could also do something similar with AutoHotKey, but for moment the Desktop shortcuts are working great and without delay, so I'm good. :)

Re: Global hotkeys / media keys don't work

by Peke » Tue Aug 04, 2020 5:08 pm

Hi,
I do not have a problem as I create Macro Hotkey in Logitech App. Do not have Asus ROG PC hardware except ASUS Routers (an MSI Fan) to test with ROG software.

But I really doubt that you can't create macro to execute external application like I can in Logitech software and not create Windows shortcut that you assign to ROG macro?

See how it looks on MY PC:
Image

Re: Global hotkeys / media keys don't work

by Coincident » Sun Aug 02, 2020 6:28 am

I found the source of the problem with the 4 second delay, and solved it. It's working instantaneously now.

For future reference, this was the problem:
Coincident wrote: Thu Jul 30, 2020 4:20 pmI tried download the latest keyboard drivers from my manufacturer
Previously I had downloaded and installed the ASUS ROG ARMOURY software pack, which is the only way to install the manufacturer's drivers manually.
It turns out that the ASUS ROG ARMOURY is trash, and was causing several random problems in windows; including causing my keyboard to crash and stop responding to the "FN" key (needed for the media keys), and also was causing the 4 second delay.
I completely uninstalled every single piece of ASUS ROG software from windows, and rebooted my computer. Windows then used it's own default drivers for my keyboard, which are working perfectly fine.

The Global Hotkeys of MediaMonkey still do not work directly, but with the help of the MMKeys.exe tool, my problem is now completely solved.

Thank you very much again, and keep making MediaMonkey great! <3

Edit1 - A bit more extra info for the future: after a while, even without ASUS' faulty software, the 4-second delay returned. I fixed it by uninstalling from Windows' "Mail & Calendar", and a bunch of other windows applications that I didn't use anyway. The app causing the delay might be different for each computer, but do read this if you have the same problem:
https://superuser.com/questions/426947/ ... -shortcuts

Edit2 - To discover which app is causing the delay, go to the Task Manager, try to terminate one app that feel suspicious, and try the shortcut again to see if the delay disappeared. Depending on each case, the app that is causing the delay - windows may not allow you to uninstall it (things such as "Search" or "Cortana" or "Settings") If that's the case, then go to the Control Panel and search for "Background apps". There you can turn off many non-essential things from windows, and they will no longer stick around (sometimes as "suspended processes") and cause delays for everything else. Remember to restart windows after changing that.

Re: Global hotkeys / media keys don't work

by Coincident » Sun Aug 02, 2020 6:05 am

Your hotkey.exe app shows this (I don't know what it means)
When Doing CTRL+ALT+P Manually:

Code: Select all

Keyboard ID: 65605
Pressed Key: CONTROL
VKey ID: 0011
State Flags: 0000
HotKey: CTRL+
--------
Keyboard ID: 65605
Pressed Key: MENU
VKey ID: 0012
State Flags: 0000
HotKey: CTRL+ALT+
--------
Keyboard ID: 65605
Pressed Key: P
VKey ID: 0050
State Flags: 0001
HotKey: CTRL+ALT+P
When pressing the media key "Next": (which windows is translating into CTRL+ALT+P in the shortcuts)

Code: Select all

--------
Device ID: 131151
HID_DATA[1]: 80000000
Hotkey: 
--------
Keyboard ID: 0
Pressed Key: MEDIA NEXT TRACK
VKey ID: 00B0
State Flags: 0002
HotKey: MEDIA NEXT TRACK
--------
Param CMD: 11
Param: APPCOMMAND_MEDIA_NEXTTRACK
--------
Device ID: 131151
HID_DATA[1]: 0
Hotkey: 
--------
Keyboard ID: 0
Pressed Key: MEDIA NEXT TRACK
VKey ID: 00B0
State Flags: 0003
HotKey: MEDIA NEXT TRACK
I tried making a copy of MMKeys.exe called PlayPause.exe, but then I still need to create a Desktop shortcut to PlayPause.exe, so that I can assign a shortcut key. After that, it still has a delay of 4 seconds. If I double-click the shortcut, it play/pauses immediately, so I think the 4 seconds is the time for windows to pick-up the shortcut key......

Apparently there are more people facing this problem (it's related to windows 10 directly) https://answers.microsoft.com/en-us/win ... 7fe7f3853a
I will investigate some more.

Thank you again.

Re: Global hotkeys / media keys don't work

by Peke » Sat Aug 01, 2020 6:29 pm

Hi,
You can make multiple copies of MMKeys.exe and rename them into command you want to execute eg. PlayPause.exe, Next.exe, Stop.exe -> Edit MMkeys.ini file to point to MediaMonkey Install folder, and you should remove the delay.

Also it is strange Mediakeys get translated at all for me they are only MEDIA_PLAY_PAUSE or MEDIA_STOP not shortcuts.

Please use my http://www.happymonkeying.com/eSupport/hotkey.zip app to fetch what your keyboard driver send focused or non focused it is strange.

EDIT: If they are translates to those keys please note that that is not normal
https://defkey.com/what-means/ctrl-alt-g
https://defkey.com/what-means/ctrl-alt-p
https://defkey.com/what-means/ctrl-alt-t

Re: Global hotkeys / media keys don't work

by Coincident » Sat Aug 01, 2020 2:08 pm

Peke wrote: Fri Jul 31, 2020 7:30 pm Hi,
I just tested and my 15 years old app still works :) you can read about it at https://www.mediamonkey.com/support/ind ... -dont-work Point 6.

To cut things short download last update version extract to some folder like c:\MMkeys (that is the folder Setup file installs it). Please read "MMKeys.txt" on command line usage or if you wish to evade command line read "Appendix" on how to rename "MMkeys.exe" in order to make it work.

To be honest except that Digital Signature expired and you need to ignore it (More Info -> RUN ANYWAY) it still works flawlessly.
That took some work, but I eventually got it to work. I installed the MMKeys as per the description, and created 3 shortcuts for the executable with the correct args; for Play/Pause, Next, Stop. Then I edited the properties of each shortcut and set the desired shortcut keys from my keyboard. It took me a while to realize this only works if the shortcuts placed directly in the Desktop, and only AFTERWARDS can the shortcut keys be set.

If I try to assign to the shortcuts the media keys, windows "translates" them into CTRL+ALT+G/P/T, and they never work at all. So instead I used CTRL+ALT+P manually for Pause/Play for example, and that is working, even though it has a 4 second delay...

Either way, the main problem is solved for now. I will try to clean up my keyboard drivers to see if it helps with the delay.
Thank you so much Peke and Lowlander!

I'm angry at windows 10 for all of this mess. MediaMonkey still rocks! (even if with some 15-year-old-hacks) :D

Re: Global hotkeys / media keys don't work

by Peke » Fri Jul 31, 2020 7:30 pm

Hi,
I just tested and my 15 years old app still works :) you can read about it at https://www.mediamonkey.com/support/ind ... -dont-work Point 6.

To cut things short download last update version extract to some folder like c:\MMkeys (that is the folder Setup file installs it). Please read "MMKeys.txt" on command line usage or if you wish to evade command line read "Appendix" on how to rename "MMkeys.exe" in order to make it work.

To be honest except that Digital Signature expired and you need to ignore it (More Info -> RUN ANYWAY) it still works flawlessly.

Re: Global hotkeys / media keys don't work

by Coincident » Fri Jul 31, 2020 11:03 am

Sorry for the double posting, but I'd also like to think about a plan B:
Is there any other way to achieve the same functions as the global hotkeys, without using them directly?

Are there any command-line arguments that I can call from a Powershell console, for example, to tell MediaMonkey to Play/Pause/Stop/etc?
I could use keyboard macros to do that with 1 key, and problem solved (I think).

It's really sad to see that a fully-updated windows 10 causes more problems than a windows 7 that hadn't received updates from 10+ months. I really regret upgrading :(

Re: Global hotkeys / media keys don't work

by Coincident » Fri Jul 31, 2020 3:43 am

Peke wrote: Thu Jul 30, 2020 9:58 pm Hi,
What keyboard you have? I have Logitech G19s and have no issues. Thi is first time that PreferLLKeysHook didn't fixed that.

Have you tried to Manually Kill Keyboard driver apps in task manager?
I have an ASUS ROG Claymore keyboard.
I haven't tried killing driver apps from the task manager - I didn't even know that was possible.
It might make sense because I suspect that I might have multiple drivers installed simultaneously (those that windows installed, and those that I installed manually).
How can I do that (or where can I find info about that)?

Re: Global hotkeys / media keys don't work

by Peke » Thu Jul 30, 2020 9:58 pm

Hi,
What keyboard you have? I have Logitech G19s and have no issues. Thi is first time that PreferLLKeysHook didn't fixed that.

Have you tried to Manually Kill Keyboard driver apps in task manager?

Re: Global hotkeys / media keys don't work

by Coincident » Thu Jul 30, 2020 4:20 pm

Peke wrote: Thu Jul 30, 2020 2:23 pm 1. In games which take over Keyboard handling
2. Chrome is known that take over media keys
3. Keyboard driver (Microsoft keyboards/mouse driver is known to do that)

One of solution is to close MM and in MediaMonkey.ini you add line "PreferLLKeysHook = 1" under [options] section and then MM Hotkeys should work globally.
Hello.
I don't have any game open, and I closed Chrome and everything else, and I'm looking at the desktop with MediaMonkey minimized playing something.
The media keys just open Windows Media Player (sometimes, other times they do nothing). If I choose a different hotkey combination (e.g. CTRL+P), it only works when the MediaMonkey windows is focused, and does nothing on the desktop.

I tried download the latest keyboard drivers from my manufacturer, and also add in the "PreferLLKeysHook=1" line right after "[options]" in the MediaMonkey.ini file.
However, the problem persists.

Re: Global hotkeys / media keys don't work

by Peke » Thu Jul 30, 2020 2:23 pm

Hi,
There is few cases where Global hotkey do not work:
1. In games which take over Keyboard handling
2. Chrome is known that take over media keys
3. Keyboard driver (Microsoft keyboards/mouse driver is known to do that)

One of solution is to close MM and in MediaMonkey.ini you add line "PreferLLKeysHook = 1" under [options] section and then MM Hotkeys should work globally.

Top