Skip to content

Instantly share code, notes, and snippets.

@blockloop
Created October 1, 2013 21:21
Show Gist options
  • Save blockloop/6785291 to your computer and use it in GitHub Desktop.
Save blockloop/6785291 to your computer and use it in GitHub Desktop.
Control Spotify with key combinations using autohotkey.
#SingleInstance force
SetTitleMatchMode 2
RControl & UP::
Send {Volume_Up}
return
RControl & DOWN::
Send {Volume_Down}
return
RControl & Left::
{
DetectHiddenWindows, On
IfWinExist Spotify
{
ControlSend, ahk_parent, ^{Left}, ahk_class SpotifyMainWindow
}
else
{
Send {Media_Prev}
}
DetectHiddenWindows, Off
return
}
RControl & Right::
{
DetectHiddenWindows, On
IfWinExist Spotify
{
ControlSend, ahk_parent, ^{Right}, ahk_class SpotifyMainWindow
}
else
{
Send {Media_Next}
}
DetectHiddenWindows, Off
return
}
RControl & Enter::
{
DetectHiddenWindows, On
IfWinExist Spotify
{
ControlSend, ahk_parent, {space}, ahk_class SpotifyMainWindow
}
else
{
Send {Media_Play_Pause}
}
DetectHiddenWindows, Off
return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment