I am making a wrapper for keyboard input using Direct Input. To grab the key states, the function GetDeviceState()
is called with a char buffer.
This is all well and good, but now to send key events I must iterate through the buffer and check against all the keys that were pressed. I was hoping there would be a callback instead that only passed the key codes that were pressed.
If anybody has experience with Direct Input, is iterating through the key code buffer the only way to check for key presses?