Jump to content
  • Advertisement


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


DirectInput KeyDown events

This topic is 5285 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

I am using Managed DirectX 9 to write a 3d Engine to use for a game I want to create in the future. My problem concerns keyboard input. I have some menus and things that appear on certain keypress, but when you press the key often times the menu will just flash up and disappear again because it is reading if they key was pressed or not and it seems to be reading that it has been held down so it keeps running the display/hide function for that menu. I need the keys to be continuously read like this for things like camera control, but for these menus it need to be more of an onKeyDown kind of thing. Does DirectInput have an onKeyDown function or similar method??? -------------------------------------------------------------------------- The meaning of life is to live, and there''s only one way to do it wrong... Michael Schuld - March 25, 2004

Share this post

Link to post
Share on other sites
DirectInput was not made for handling menus, text input, etc... It IS possible to do these things with DirectInput, but that would be going against what DirectInput is trying to accomplish in the first place. DirectInput is meant for very fast access to input devices. Things like controling the camera or in-game entities are what DirectInput is very good at.

If you just want to handle menus, text, and other things that don''t require very fast access to input devices, it is MUCH easier to use standard Win32 messages. There is no conflict between the two. An application can happily use Win32 messages as well as DirectInput without any problems.


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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!