Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intercept media keys on ASUS laptop

I have an ASUS laptop (F50SF) and I was playing around in C++ trying to intercept the multimedia keys (next track, previous track, play/pause, etc.), but I cannot figure out exactly how to do this. I tried GetAsyncKeyState(VK_MEDIA_NEXT_TRACK) but to no avail.

I know it is possible (and that the keys are working in the first place) because these keys work fine in Windows Media Player.

Any ideas?

like image 222
Cameron Avatar asked Dec 10 '22 19:12

Cameron


1 Answers

The problem is the ATK Media utility provided by Asus is completely locked and instead of emiting keyboard events (like normal media keys), it maps them to specific apps. The order and name of apps that it looks for change depending on version and system, but luckily there's a fix!

I just came across the solution for this after some time reading a bunch of sites.

  1. Download the rar package from this blog post: http://3mptylab.blogspot.it/2012/09/how-to-make-asus-notebooks-media-keys.html

  2. Stop the current DMedia.exe process.

  3. Go to your ATK Media install folder (normally C:\Program Files (x86)\ASUS\ATK Package\ATK Media) and rename DMedia.exe to DMedia.exe.old (just to be safe).

  4. Put DMedia.exe you'll find in the RAR into the ATK Media dir. Double click it to run it but it gets run at boot anyway.

  5. Check if the media keys work as they should. Grab a beer or watch a movie if it works!

I just tested it in my Asus U30Jc under Win8 Pro 64-bits and works great! This tool actually maps generic keyboard events to the media keys in the integrated keyboard, so they work with any app enabled for this (in some cases like Winamp you might need to enable global keys).

like image 90
Rodrigo Chiong Avatar answered Dec 28 '22 23:12

Rodrigo Chiong