Original Post
What can I use for keyboard input besides _KeyDown and DX? I'd like to stay away from DirectInput because of possible problems compiling on the computers at school.
Quote:
Original post by kanato
You could just P/Invoke to GetAsyncKeyState if you want: http://www.pinvoke.net/default.aspx/user32/GetAsyncKeyState.html
That would break your portability to Linux if you cared about that though.
The other approach would be to write a little class which keeps an array for the various keys, then attaches to your Form's KeyDown and KeyUp events (make sure KeyPreview is true) and keeps track of which keys are up and down.
This topic has been locked by a moderator. New replies are not allowed.
With your permission, GameDev.net uses analytics cookies to understand how people use the platform. You can accept analytics or continue with necessary cookies only. Learn more