Let me say it clearly: ASUS I Hate you.
Ok, actually I don't hate asus. They make great products. I'm just ranting about the fact that they limited their notebooks' media keys to work only with, say, Windows Media Player or Media Center.
I was a big Winamp user (I recently switched to MusicBee) and I was desperate to find a way to make my media keys work with it so I could play Left4Dead and skip songs while playing.
After hours of googling I found the answer: http://zaak404.wordpress.com/2011/05/09/controlling-foobar2000-with-asus-g73-media-keys/
All you have to do is to replace ASUS' DMedia.exe (C:\Program Files (x86)\ASUS\ATK Package\ATK Media) with the supplied one and you are almost done. Zaak404's versione requires you to write a small configuration file to make his program interact only with one single media player... I'm lazy (and I reinstall windows frequently) so I made my own version of his program and it doesn't require any user effort.
So, kudos to zaak404 for doing all the real (read "hard") work on this code. I just edited it to make it work "globally". I'm using windows' keybd_event function, which has been around from win 3.1 I think :D It's deprecated, but it still works in windows 7 so... I don't give a fuck about it ;)
I packed the binary in a Zip file with a .bat file. To install it just right-click install.bat and run it as administrator. Now restart your PC and all should work fine. If it doesn't it probably means ASUS changed the default DMedia.exe's directory, so you have to find the new one and copy manually .\bin\Release\DMedia.exe.
If you have any other problem, just drop a comment below.
Download .ZIP
Repository@BitBucket
Nice done. Cheers mate :)
ReplyDeleteThank you for taking the time to write the original code ;)
ReplyDeleteBtw, I noticed with my new asus pc that if I replace the original EXE and restart this utility doesn't work, but if I delete the EXE and put the utility in the autostart folder it works... Who knows wtf goes wrong ahah :D
Thanks so much ^^
ReplyDelete3mpty, I tried all the methods u mentioned but the shortcut is not launching MusicBee in my ASUS U46E. help!!
ReplyDeleteWhat do you mean by "launching"?
ReplyDeleteThis utility only works with Play/Stop/Prev/Next keys.
Hey, I wonder, is there a way to remap Fn+arrows to Home-PgUp-PgDown-End instead (MacBook-style)? Thanks a lot in advance!
ReplyDeleteOkay, nevermind, made it myself. Just used this piece of code: https://gist.github.com/4105624/download# and changed VK_MEDIA_PLAY_PAUSE to VK_NEXT and so on. Works like a charm, thank you very much!
ReplyDeleteI'm glad it worked ;)
ReplyDeleteThis is fantastic, as I can now use the media keys with iTunes and the Music app (Windows 8). Just one thing, the calculator key (Fn + NumericKeyPadEnter) seems also to be managed by DMedia.exe and so no longer functions. Not a big deal, but would be great if this functionality could be included.
ReplyDeleteIn my notebook it works like a charm :/
ReplyDeleteSame problem here
ReplyDeleteCalculator key (Fn + NumericKeyPadEnter) not working anymore.
I'm on windows 8 too.
Guys, I don't have a Windows 8 machine around so I'm not gonna fix it any time soon. If someone of you has coding skills he could try to hack the code in some way and I'll be happy to merge the patch.
ReplyDeleteI reccomend you to point your browser to zaak404 original application. It requires a little bit of setup but it's a much much cleaner solution so probably it won't mess up with the calculator key.
This comment has been removed by the author.
DeleteThis comment has been removed by the author.
ReplyDeleteHi 3mpty, thank you for your great work and for the replay. Unfortunately I have zero coding skills :(
ReplyDeleteAs I can see that you have an ASUS laptop you may be interested in this:
http://forum.notebookreview.com/asus/150016-asus-notebook-keys-v1-3-a-24.html
You can remap other Fn functions with it.
The link is from the last page with the last post being mine as I have a problem with it and I'm hoping that you may have the time and you are kind enough to help me.
Thank you in advance.
Liviu
P.S. Where are you from? (Esti roman?)
You can contact me at liviupreda2003@yahoo.com
Mail or Yahoo Messenger.
P.S.2 Sorry for the comments mess :|
My antivirus has recognised this as a virus (trojan) and wont let me install it unless I turn off antivirus. I turned off and installed, but as soon as I turn antivirus back on it wipes the file... anyone else had this problem?
ReplyDeleteLOL had same problem with one of the latest update of Avast. I just sended them a false positive report and in the next update it wasn't recognised as a malware anymore. Kinda annoying.
ReplyDeleteObviously you have no reason to trust me, but the source code is on BitBucket and it's something like 40 lines of (real) code.
Worked flawlessly. Thanks!
ReplyDelete