Okay, this is admittedly a little obscure.

I have a standard Microsoft keyboard that includes 'media' keys - play/pause and volume adjust / mute. If Windows Media Player is open, pressing these keys triggers the appropriate action, even if the player doesn't have focus. This is good.

What's not good is if I have an mp3 file selected in windows explorer, pressing the 'play' button on my keyboard opens that file in Windows Media Player - even if the player is already in the middle of playing something else.

I only want to disabled the 'pressing the play key opens currently selected file in media player' functionality, not the 'pressing the play key makes media player play what's already in the playlist' - is this possible?

2 Answers 2


Here is a small AHK script I wrote if you are interested in going that way.

; Check if Active Window is File Explorer
#IfWinActive ahk_class CabinetWClass ahk_exe explorer.exe
        ; Set Windows Taskbar as Active Window
        WinActivate ahk_class Shell_TrayWnd ahk_exe explorer.exe
        ; Send the hotkey
        SendInput {Media_Play_Pause}
        ; Set focus back to File Explorer
        WinActivate ahk_class CabinetWClass ahk_exe explorer.exe
; #IfWinActive in next line is important
  • I actually really appreciate the somewhat hacky solution - I'm not sure how far I feel like diving into AHK at the moment, but I will add this to my todo list. thanks! Apr 1, 2016 at 23:58

I'm having this same problem. The solution posted for AHK doesn't seem to work on my system. I ended up using this AHK script, and it worked:

  ControlSend,,{Media_Play_Pause},Windows Media Player
  • could you elaborate on why your answer worked? Dec 9, 2016 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.