   Managed DirectInput Keyboard State Changes?
  Hi all,Is there anyway to get state changes like "KeyDown" or "KeyUp" from Managed Direct Input? I''m trying to get key presses to happen just once no matter how long you hold the button down after the press, instead of happening many times due to DirectX repeatedly telling me the key is pressed. Example: when you press the pause key (P) - no matter how long you hold down the key after you press it the game is paused once and stays paused until you let up on the key and press it again.Just as a quick precursor - I''ve done my homework through the forums and google for this question and couldn''t find a suitable answer. There was a thread that was very similar to this question (here: http://www.gamedev.net/community/forums/topic.asp?topic_id=196264) but an answer that would work with the managed DirctInput interfaces was never posted. I''ve also recently picked up Tom Miller''s "Managed DirectX 9" book which blazes through input and doesn''t address this issue.The problem is that there is only one useful method to get the keyboard state (really two but I only want to see the state of all keys, the other returns an array of which keys in particular are pressed at a given moment). This is the DirectInput.Device.GetCurrentKeyboardState() method. So, clearly with just that you have no way of checking KeyUp and KeyDown events. You would think it would be simple, implementing something similar to:public void Poll(){m_oldState = m_newState;m_newState = kb.GetCurrentKeyboardState();}public bool KeyDown(Key k){if (m_oldState[k] == false && m_newState[k] == true) {return true;}return false;}  Unfortunately, this does not work. The poster of that thread I referenced above mentioned that the keyboard state returned by GetCurrentKeyboardState() is a singleton.. which results in m_oldState always being equal to m_newState no matter what you do. Also as an added bonus (/sarcasm) you can''t iterate through the keyboard state to create any kind of secondary version manually.Has anyone found a solution to this? There has GOT to be a way to do this - and I could have sworn there was an easy way in older DirectX for C++ versions!Thanks for any help,technic 