Control Google Music with Media Keys

I've been trying out Google Music's All Access service ($7.99/month if you start the free trial before June 30th) as an alternative to Spotify. While I haven't decided which one I will continue using, there was one feature I needed before I could even consider Google Music: media key support.

Many keyboards have special keys that allow you to play, pause and skip tracks while listening to music. These keys usually work automatically with desktop applications that play music, but it's a different story with web browsers. Since Google Music doesn't have a desktop application, I needed another solution.

Check out the excellent Sway.fm Unified Music Media Keys extension for Google Chrome. This works on Macs and PCs1, and lets you control a variety of websites using your media keys. The list includes Google Music, Pandora, Rdio, Grooveshark, Last.fm, and more. Seriously, check it out.

Technical Details

For troubleshooting purposes (or if you're curious), I'm including some information about how the plugin seems to work on Windows. The plugin will intercept the keyboard presses VK_MEDIA_PLAY_PAUSE, VK_MEDIA_NEXT_TRACK and VK_MEDIA_PREV_TRACK. It does not intercept WM_APPCOMMANDs. By default, keyboards should send the scan codes for the virtual keys properly, but enhancement software (like Microsoft's IntelliType / Mouse and Keyboard Center) can get intercept these presses and issue app commands instead. You will either need to disable this software or reconfigure it.2

2 thoughts on “Control Google Music with Media Keys

  1. Conor

    Thank you for this. It is exciting to know that this can work. I am having a bit of trouble, however. When I run the pdftex_build.bat (and a lualatex one I added), it does complete the process, but no pdf is produced. The console says it does not like the "-aux-directory=' or '-output-directory=' options and it seems to be adding an extra \ when it appends a file or directory.

    Specifically, it says:

    pdflatex.exe: unrecognized option `-aux-directory=C:\Users\CCook2014\Dropbox\LaSalle-Catholic-Music\School\Christmas_concert\Music\3rd" -output-directory=C:\Users\CCook2014\Dropbox\LaSalle-Catholic-Music\School\Christmas_concert\Music\3rd"'

    It also says:

    Error: Could not send DDE command.
    Command: [ForwardSearch("C:\Users\CCook2014\Dropbox\LaSalle-Catholic-Music\School\Christmas_concert\Music\3rd\\Magnificat_chant-main.pdf", "C:\Users\CCook2014\Dropbox\LaSalle-Catholic-Music\School\Christmas_concert\Music\3rd\Magnificat_chant-main.tex", 34, 0, 0, 0)]

    What's going on?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *