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
Not sure you can see this anymore, but I tried it myself but it does not seem to be working. I replaced the Dmedia file with the one from the zip you had and then ran the batch file as well and restarted my computer and it does not seem to be working for things like itunes or zune player. Am I doing something wrong, or is that just not the function of this file?
DeleteThanks 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!
ReplyDeleteHi 3mpty. This program requires administrative privilege every time I log on. Is there anyway to get rid of it?
ReplyDeleteMaybe try something like this: http://www.techrepublic.com/blog/windows-and-office/run-uac-restricted-programs-without-the-uac-prompt/
Deletecan anyone teach me how to use this app, because i'm not good enough on C++ (T__T)
ReplyDeleteIf you install this and it still isn't working in winamp... make sure you enable Global Media Hotkeys in winamp. They were disabled in my fresh install.
ReplyDeleteYou are a NATIONAL HERO. Thank you.
ReplyDeleteGOD (OF YOUR CHOICE) BLESS YOU!
ReplyDeleteYour solution is the only one that works with my N55SF
wow so good
Works on Asus X550 with Windows 8. Thanks a lot for this man.
ReplyDeletehello, ive tried all this but im still having trouble with spotify, maybe there is a diference in programs?
ReplyDeleteThanks!
ReplyDeleteYou save my day dude! :D
ReplyDeleteHi it works but I also have Avira antivirus saying it's a trojan...
ReplyDeleteHow can I be sure it isn't?
The version of zak404 here didn't trigger the antivirus.
http://zaak404.wordpress.com/2011/05/09/controlling-foobar2000-with-asus-g73-media-keys/
Best,
Adrien
Then fill in the form for false positives on avira's website please. I think zaak404 used microsoft compiler while I've used CYGWIN (if I remember right).
DeleteI had to do the same with Avast. Anyway if you don't trust me you can look at the code and compile it by yourself.
Thanks! Works on asus g46vw with iTunes on Windows 8.1 update.
ReplyDeleteThank you for your good work! :)
ReplyDeleteThanks a lot for this fix !
ReplyDeleteUnfortunately, the fix is broken when the Microsoft "Mouse and keyboard center" is installed. You have to choose !
http://www.microsoft.com/hardware/en-us/downloads/mouse-keyboard-center
Great work and thaks for sharing!
ReplyDeleteIt is working fine with itunes/windows 8.1! :) Exactly what I needed, thank you so much!
ReplyDeleteWorks on Asus N56VB + Win7 at glance.
ReplyDeleteMany many thanks!
Awesome work, thank you. Works flawlessly with iTunes on Win8.1 Pro on K53sv. Also the calculator shortcut still works.
ReplyDeleteThank you for your this, works perfectly fine. Simple instructions.
ReplyDeleteThanks much. Works great.
ReplyDeleteSweet god! Thank you very much! (Working with latest iTunes and N61JV)
ReplyDeleteThank you!! :-) Very easy. Working on S56CA with Windows 8.1 and using Prime Player for google play music.
ReplyDeleteThe file is whitelisted now by eset.
ReplyDeleteAnyone tried this on Windows 10?
ReplyDeleteFor me, it works as it normally did. I can't get the play/pause keys to work globally using KMPlayer.
I am from th future and I tell that this works with Asus N53SM, Windows 7.
ReplyDeleteYeah, in the future we still use Windows 7.
Thanks man!! It works on Asus S400C usign Spotify :D
ReplyDeleteUsing Windows 10!
DeleteWhy my Winamp needs to be in front to work this? If it's minimized the keys doesn't work!
ReplyDeleteI JUST LOVE YOU GUY!
ReplyDeleteFixed my S550C, now using keys with Spotify. Many thanks.
Hey, thank you for your time editing the codes. It works great on my Asus. I am using foobar. Thanks again :)
ReplyDeleteWorks like a charm. I thank you for this, kind sir.
ReplyDeleteAlso, yes, virustotal gives it a 25/56 score but it's NOT a trojan.
Hi! Know i have windows 10 and the latest atk package, but your codes aren't working with me. Could you help me?
ReplyDeleteSeems to have stopped working for me (Windows 7 64 Bit) somehow, at least it doesn't work with MusicBee 3.2 anymore and I think it used to work in the beginning.
ReplyDeleteMaybe it's really time to replace my notebook finally...
Thank You and I have a dandy provide: What Renovations Increase The Value Of A Home average home renovation cost
ReplyDelete