is there a way to detect if 2 keys are being pressed at once or if a key is being held down? i need this for a pong program i have made, as of right now only one paddle can move at an instant and you have to tap the key to make it move
is there a way to detect if 2 keys are being pressed at once or if a key is being held down? i need this for a pong program i have made, as of right now only one paddle can move at an instant and you have to tap the key to make it move
kbhit and getch can only detect one key so, no luck.
Yoshi
if this is a windows program or windows console program then you have access to the win32 api. One function that you will find useful is GetAsyncKeyState(). Search for information on its use in either your help files or at msdn.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi