That looks like it should do something, both when you press ALT+f1, and when you release it.
Are you sure that the window you're using has the keyboard focus? In some programs, it can be tricky to know which has focus, in cases where your main window is a frame window, and the window you are interacting with is its client window. In this case, the client window will get the messages.
I'm attaching some of my own code, this DOES work. I hope it helps.
Code:
switch (msg)
{
// other nonrelevant stuff removed for clarity
case WM_SYSKEYDOWN:
if (wParam == 'F') s.showFPS = !s.showFPS;
case WM_KEYDOWN:
// Handle any non-alt combo key commands
switch (wParam)
{
case VK_F1:
PlaySound("audio\\hailduke.aud", 0, SND_ASYNC | SND_NODEFAULT| SND_FILENAME);
break;
case VK_F2:
MIDI->Play("audio\\theme.mus");
break;
case VK_F3:
MIDI->Play("audio\\loop.mus",true);
break;
case VK_F4:
MIDI->Stop();
PlaySound("",0,SND_ASYNC);
break;
case VK_F12:
absolutelyUpdate = true;
break;
case VK_SPACE:
spaceIsDown = true;
break;
}
break;
case WM_SYSKEYUP:
case WM_KEYUP:
//handle key release commands
switch(wParam){
case VK_SPACE:
spaceIsDown = false;
break;
case VK_F12:
absolutelyUpdate = false;
break;
}
break;
}