You'll need to install this on your Windows box to make it work: https://autohotkey.com
This is my media.ahk autohotkey script:
Gosub, %1%
return
next:
Send {Media_Next}
return
previous:
Send {Media_Prev}
return
pause:
Send {Media_Play_Pause}
return
play:
Send {Media_Play_Pause}
return
stop:
Send {Media_Stop}
return
volup:
Send {Volume_Up}
return
voldown:
Send {Volume_Down}
return
mute:
Send {Volume_Mute}
return
These are the corresponding commands.json entries:
{"trigger":"Mute","command":"start C:\\autohotkeyscripts\\media.ahk mute","ground":"foreground","voice":"mute"},
{"trigger":"Volume Up","command":"start C:\\autohotkeyscripts\\media.ahk volup","ground":"foreground","voice":"volume up"},
{"trigger":"Volume Down","command":"start C:\\autohotkeyscripts\\media.ahk voldown","ground":"foreground","voice":"volume down"},
{"trigger":"Media Next","command":"start C:\\autohotkeyscripts\\media.ahk next","ground":"foreground","voice":"next"},
{"trigger":"Media Stop","command":"start C:\\autohotkeyscripts\\media.ahk stop","ground":"foreground","voice":"stop"},
{"trigger":"Media Previous","command":"start C:\\autohotkeyscripts\\media.ahk previous","ground":"foreground","voice":"previous"},
{"trigger":"Media Play Pause","command":"start C:\\autohotkeyscripts\\media.ahk pause","ground":"foreground","voice":"pause"},
NOTE: You don't need a Play and a Pause because they do the same thing - they just toggle between play and pause.
This is optional, but I'm also using my Raspberry Pi based IR receiver to trigger the above commands with a VCR remote.
I have these entries in my /etc/lirc/lircrc file on the Pi:
begin
prog = irexec
button = KEY_1
config = export HOME=/root ; /root/triggertest.sh play downstairs
end
begin
prog = irexec
button = KEY_2
config = export HOME=/root ; /root/triggertest.sh notepad downstairs
end
begin
prog = irexec
button = KEY_PLAY
config = export HOME=/root ; /root/triggertest.sh "Media Play Pause" downstairs
end
begin
prog = irexec
button = KEY_PAUSE
config = export HOME=/root ; /root/triggertest.sh "Media Play Pause" downstairs
end
begin
prog = irexec
button = KEY_RIGHT
config = export HOME=/root ; /root/triggertest.sh "Media Next" downstairs
end
begin
prog = irexec
button = KEY_LEFT
config = export HOME=/root ; /root/triggertest.sh "Media Previous" downstairs
end
begin
prog = irexec
button = KEY_STOP
config = export HOME=/root ; /root/triggertest.sh "Media Stop" downstairs
end
begin
prog = irexec
button = KEY_UP
config = export HOME=/root ; /root/triggertest.sh "Volume Up" downstairs
end
begin
prog = irexec
button = KEY_DOWN
config = export HOME=/root ; /root/triggertest.sh "Volume Down" downstairs
end
begin
prog = irexec
button = KEY_MUTE
config = export HOME=/root ; /root/triggertest.sh "Mute" downstairs
end