Sign in to follow this  
ajm113

Alt-Enter?

Recommended Posts

How do I have it so if the user is pressing Alt - Enter then it triggers the event? I know I need to use these commands put how do I get them to work together so they trigger fulscreen and window mod like Doom3? VK_RETURN = Enter Key VK_MENU = Alt Key. I does not work for some reason....

Share this post


Link to post
Share on other sites
Can you handle the enter key being pressed? If so, think about how you could combine that with GetAsyncKeyState to your advantage. (It tells you if any one of a certain set of system keys is currently pressed or not.)

If, though, you're confused about handling key presses in general, some background information about your application would help in suggesting an answer. Since you're posting in the NeHe forum, though, I'll assume you already have the framework of key handling set up.

Best of luck!
-jouley

Share this post


Link to post
Share on other sites
Well I am using the first lession on creating the window and I have this code:

if (keys[VK_RETURN]) // Is F8 Being Pressed?
{
keys[VK_RETURN]=FALSE; // If So Make Key FALSE
KillGLWindow(); // Kill Our Current Window
fullscreen=!fullscreen; // Toggle Fullscreen / Windowed Mode
// Recreate Our OpenGL Window
if (!CreateGLWindow("My First Render! - sort of",640,480,16,fullscreen))
{
return 0; // Quit If Window Was Not Created
}

I tried the VK_RETURN | VK_MENU but that does not work. I want it to trigger the fulscreen event on the code. I hope this helps.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this