   Window keys
  Hello,I'm starting Windows programming and I'm searching how I can simply retrieve the current key pressed...Thanks for your answer!   
  What language are you using?   ;  First of all you need a message loop so that your program can check for keypresses.Click on the links for tutorials on how to create a message loop and how to accept keyboard input.   ;  Beat me to it. I'd give Undead a rating++, he deserves it.   ;  You can also use GetAsyncKeyState from the Windows API. You can find the details on it's use at MSDN. I suspect undeads method is the easier of the two if you're using C.   ;  OK, it works. I use the message loop and I copy wParam to a variable ifkey down or I set it to -1 if key is up. My GetKey() function simply returns the variable.Thanks a lot!Is there a way to do it without using the message loop, like with GetAsyncKeyState() for example?n.b. I use C++   ;  Your program always has to poll (check) for key presses using a loop, so no.   