Re: Key-press detection



"Ben Bacarisse" <ben.usenet@xxxxxxxxx> wrote in message
news:874pijefza.fsf@xxxxxxxxxxxx
"Jim Langston" <tazmaster@xxxxxxxxxxxxxx> writes:

"David Sweeney" <David.Sweeney8@xxxxxxxxxxxxxx> wrote in message
news:OYGdnUcGVZFJ00nbnZ2dnUVZ8tChnZ2d@xxxxxxxxx

I am using C++ (with the Visual C++ compiler) on Windows XP
<snip>

What langauge ARE you using?

Did you miss that or are you making a point *I'm* missing?

O.o Totally.

If you're using windows callbacks (windowed program) you can trap WM_CHAR
WM_KEYDOWN WM_KEYUP

If you would rather do it interactively, you can use _kbhit() and _getch()

If you would rather use iostream you can use std::cin >> char

If you would rather use DirectX, look at DirectInput


.