2

I've bought a new remote control and am using AHK to rebind some of its buttons. It doesn't have a software to set what each button will do, "it just works". Using KeypressOSD.ahk I'm able to see what keystroke it's sending.

So, it has a button that sends Win+Alt+Enter so that Windows Media Center opens. I want to prevent this shortcut from opening Windows Media Center, and make it focus Media Player Classic. This code works fine, it verifies if Media Player Classic is opened and if so it gets focus and receives a Space command:

^F1::
IfWinExist, Media Player Classic
{
  WinActivate
  Send {Space}
}
Return

I want to use the same command. But this one doesn't work, WCE still opens:

~!#Enter::
IfWinExist, Media Player Classic
{
  WinActivate
  Send {Space}
}
Return

This one works too:

~!#F2::
IfWinExist, Media Player Classic
{
  WinActivate
  Send {Space}
}
Return

1 Answer 1

0

Remove ~ from the hotkey:

!#Enter::
IfWinExist, Media Player Classic
{
  WinActivate
  Send {Space}
}
Return

Meaning of ~ (emphasis added):

When the hotkey fires, its key's native function will not be blocked (hidden from the system).

So basically, you requested the AHK to pass the original hotkey further.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .