Original Post
So many of you who have tried using Direct Input before likely have run into this problem.
When you are using Direct Input and you poll the keyboard, you are not returned with a char representing the button pressed on your computer, but you are instead presented with a scancode. now with these scan codes you can easily control buttons, and other actions in your game... only there is one problem.
I want to read text into a string. The only presented option I see is to check the keyboard state array to see what button(s) are pressed... this in turn though gives you a massive set of if statements to try and figure out what is actually pressed since you have to go through all 256 bytes in the array one at a time.
Now, I was told to try using the GDI, only problem that I see with this is that 1) I am trying to aboid the message pump as much as possible, and though I know I can get around that, I have the problem of reading keys such as backspace, or escape, and so forth without using a non-blocking call.
Is there any proposed method that is better than what is described above that I am not aware of? A lot of games use this, there is likely a better methode that I am now aware of.
Gamedev''s AI Auto-Reply bot.