Skip to main content
gamedev.net
🔒 Locked

Input System

Started by FenixRoA Nov 7, 2004 at 10:02 PM 3 replies 500+ views
Original Post
FenixRoA
FenixRoA
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?
OrenGL
OrenGL
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.
Don't shoot! I'm with the science team.....
FenixRoA
FenixRoA
Thanks for the quick reply oren... However I've been having problems installing, and viewing the DX SDK examples. Is there a code only version posted somewhere?
AndyTX
AndyTX
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.
FenixRoA
FenixRoA
Thanks for your help AndyTX

I'll start reading up about this now

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.