RSS
 

Keyboard Shortcuts for Grooveshark Desktop

05 Jun

In a further effort to open Grooveshark to 3rd party developers, we have added an External Player Control API. (Side note: yes, it’s a hack to be polling a file all the time, but it’s also the only option we have until AIR 2.0 is out and most users have it installed.) Right now that means that we have support for keyboard shortcuts for OSX and Windows computers. To enable:

First open up desktop options by clicking on your username in the upper-right corner and selecting Desktop Options.

Notice the new option: Enable Global Keyboard Shortcuts (requires helper application)

Check that box (checking this box turns on polling the file mentioned in the External Player Control API) and select the proper client for your machine. In my case I chose windows, and I’ll go through setting that up now.

When you click on the link to download the keyboard helper, it should download via your browser. Once it is downloaded, run the app.

If prompted, tell Windows not to always ask before opening this file and choose Run.

The first time the application runs, it shows a list of keyboard shortcuts.

At this point the keyboard shortcuts listed should work! If they don’t, switch back to the desktop options window and make sure you click Apply or OK, then try again.

In your system tray you should notice a new icon (note: subject to change in future versions), that looks like the desktop icon with a blue bar in the lower-right corner. Rumor has it that is supposed to look like a keyboard.

If you right-click on the tray icon, you will see that there are a few options. The default configuration is pretty good, but I recommend setting it to start with Windows, so that it always is ready.

Big thanks go to James Hartig for hacking together the external player control API and the Windows keyboard shortcut helper, and to Terin Stock for the OSX helper. You can learn more about both keyboard shortcut helpers here. Hackers/developers: please feel free to extend functionality, create your own keyboard helpers (especially for Linux) or add integration to your current apps. Just show off what you’ve done so we can link to it!

Edit: Terin has supplied some Mac screenshots as well:

 
 
  1. Steve Farbota

    June 7, 2010 at 1:09 pm

    Will there be application for Linux?

     
  2. Jay

    June 7, 2010 at 5:09 pm

    If someone wants to make one, we’re all for it. :)

     
  3. Intars Students

    June 9, 2010 at 10:33 pm

    @Steve Farbota – well, there are one who will work in Ubuntu http://github.com/intarstudents/GSDesktop-Helper

    For now no cool easy use package to install, but ruff git action, sadly, but will try to change that.

     
  4. pharkink

    July 15, 2010 at 9:06 am

    Instars app works, but I couldn’t get media keys (the play/pause button) to work, and customizing the keys didn’t work so well either. Below is a mini script I’ve made that can be used in gnome-keybinding-properties.
    Here’s how you use it:
    1) Open gnome-keybinding-properties (in ubuntu, click System->Preferences->Keyboard Shortcuts).
    2) Click on ‘Add’
    3) Fill in a name, e.g. “Grooveshark Play/Pause”
    4) Fill in the command: “gs-cmd playpause”
    5) Click “Apply”, then close the ‘custom shortcut’ window
    6) Assign a shortcut to the new command, by clicking on it and then hitting the (media) key for the action. For Play/Pause it should say “XF86AudioPlay”.

    repeat steps 2-6 for other commands like ‘next’ or ‘previous’.

    Save this script as file ‘gs-cmd’ in a location that’s in the user’s path.

    The script, gs-cmd :

    #!/bin/sh
    basedir=~/.appdata
    ctnt=`ls -A $basedir`
    for dr in $ctnt
    do
    mtch=`expr match “$dr” “GroovesharkDesktop.”`
    if [ $mtch -eq 19 ]
    then
    filedir=$basedir/$dr/”Local Store/”
    cd “$filedir”
    echo “$1” > “shortcutAction.txt”
    fi
    done

     
  5. skkf

    July 28, 2010 at 12:39 pm

    “We received yout hotkey but we could not write to the file.”

    I’m running it on windows xp sp3. What’s wrong?

     
  6. skkf

    July 28, 2010 at 1:02 pm

    I think I know why it’s not working. I’ve changed my localization of %AppData%. Now it’s under E:\system\Application Data, and when I’ve pasted the folder “GroovesharkDesktop.7F9BF17D6D9CB2159C78A6A6AB076EA0B1E0497C.1” to the original path G:\Documents and Settings\user\Application Data\ the keyboard helper is able to write pressed hotkeys to the file, but grooveshark does not respond. Is there any other way then changing back my appdata localization?

     
  7. James Hartig

    July 29, 2010 at 9:44 am

    Hey skkf, could you email me: fastest963 at gmail. Comments are the best place to start debugging this. However, before you email me:

    1) Open Start-> Run
    2) Type in %AppData% and tell me where it goes when you email me.

     
  8. Stu

    August 24, 2010 at 3:39 am

    Thanks pharkink, your script worked really well.

     
  9. Dan Egbert

    February 23, 2011 at 8:19 pm

    On Windows, you can also use WinGrooves (http://www.wingrooves.com) which has built-in customizable hotkey support.

     
  10. Jason

    September 21, 2011 at 5:35 am

    If you’re on a Mac, Musicality (industriousone.com/musicality) has global keyboard shortcuts. Works with the media keys and the remote too, plus supports Growl and Last.fm.

     
  11. lazaruslonge

    March 2, 2015 at 12:45 pm

    Brilliant. Works a treat on Win7 with GS Desktop app. Much appreciated!