   Discontinous keyboard input help
  Hey guys,I'm working on a simple game using Directx. It is kind of like the classic frogger game. However in my game there are horizontal moving platforms that the player must jump on in order to move from the starting area to the finishing area.The problem I am having is with the input. Right now I am using the GetAsyncKeyState function. However, I need something that is not continuous input, so that when the player pushes an arrow, the model moves only one unit in that direction irrespective of whether the key is held down or not.Here's the sample code for my move function (It is similar for all arrow keys, i only have one shown):void mesh::move(float step){if(GetAsyncKeyState(VK_RIGHT)){if(xPos<40.0f) //boundry check{translateMesh(step, 0.0f, 0.0f); xPos+=step;}}.   .   .}I wanted to know how I could make this input discontinuous.Thanks in advance   
  Whats with WM_KEYDOWN? Or you could block any movement that happens after moving it once, until the key is up again.   ;  If you're using GetAsyncKeyState(), you should be testing if the high bit is set, not if the result is nonzero if you want to check if the key is currently pressed.Alternatively (And better), I'd go for mind in a box's option of using WM_KEYDOWN - When you get a WM_KEYDOWN message you can set a bool to indicate that right is pressed, then when you get WM_KEYUP you can clear that bool. Then, checking if a key is pressed becomes a case of checking if that bool is true.   