DirectX: dwData member of the DIDEVICEOBJECTDATA structure

Hey guys. I've recently been trying to figure out a way to detect only a single key press in my DirectX framework, rather than the key being held down, and while I've already figured out a solution, I'd like to find a better way. The virtual keycodes for Windows hold the previous state of the key in the 29th bit of the code. In DirectX, what I've discovered is that the dwData variable represents various information regarding device object data. Specifically for the keyboard, only the low byte actually matters, and the high bit of the low byte represents the current state of the key. The other 7 bits must represent something, and I suspect one of them must be the previous state of the key. However, I cannot find information on this ANYWHERE.

If I could make use of this, it would save me from having to make an additional 256 byte array to store key states, and make the framework more efficient that way. If anyone has any information about this, I would greatly appreciate it. Thanks!
Topic archived. No new replies allowed.