Is it possible to make my console application detect if I press a C key when the window is focused? I want to do almost the same concept of key logging but I would like my program to execute keystrokes if I press a certain key, so a macro program in short. Eg. if I press W, then it should press W twice with an interval of 10 milliseconds
If I understand you correctly, you'd like to do something like create macros for an existing program, and/or automate responses to an existing program?
This is a fairly advanced concept, and I think you are in for more trouble than it is worth (at the start, at least) using C++. I recommend you get yourself a copy of Expect: http://wiki.tcl.tk/201 http://wiki.tcl.tk/11584