Recording keystroke in C++

I want to record keystrokes as user press a key.Problem with cin is that it will not do this after hitting key I have to press enter this is what I don't want.
If you want to create a game, read this: http://www.cplusplus.com/forum/articles/28558/

Alternatively you can get mulipurpose console lib. I suggest ncurses windows port: pdcurses. It allows you to have more control over console and many useful functions.

Or you can use winAPI functions like GetAsyncKeyState() http://msdn.microsoft.com/en-us/library/windows/desktop/ms646293%28v=vs.85%29.aspx

Actual solution depends on what are you trying to do.
Last edited on
Topic archived. No new replies allowed.