Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

kuphryn

Virtual Keys :: MFC

This topic is 5942 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I would like to know how to determine when the user presses, say, ''z'' *while* holding down one of the virtual keys, say Ctrl. For example // Ctrl + Z I can use either OnKeyDown(...) and/or OnChar(...) to determine *either* Ctrl or z, but not both. I am trying to implement an "undo" feature. Thanks, Kuphryn

Share this post


Link to post
Share on other sites
Advertisement
My personal solution would be to use GetAsyncKeyState with VK_CONTROL while you process the VK_Z to determine whether or not Ctrl (or shift or anything else for that matter) is being pressed simultaneously.

-fel

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!