Sign in to follow this  
FenixRoA

Input System

Recommended Posts

Here is what I need. I'm making a game from scratch (no window's form). But I still need input from the keyboard in the way window's messages come in (KeyDown, KeyUp, NOT the DirectInput way). How do I get my program which will be a C# class with no inheritance (as of yet, unless u guys can recommend me one that will give me those methods) or interface (again awaiting recommendations) to accept KeyUp and KeyDown events?

Share this post


Link to post
Share on other sites
Have a look in the DirectX SDK, install a C# example. They override the windows wndproc and get all the messages you need. I think seeing the code is better than any explenation I would try to give.

Share this post


Link to post
Share on other sites
Take at alook at DirectInput again - if you use "buffered mode" input you do indeed get the data in the format that you want.

You're talking about the difference between buffered data (history: key up, key down, etc) and immediate data (what are the key states RIGHT NOW). DirectInput supports both (even concurrently), so it'll easily be able to handle this.

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