Hello, I am looking to simulate keyboard inpout for a computer in general, not just for a window. I was allready told how to simulate keyboard strokes in a certan window, although I just want to simulate them as they might be in general. As in program says "X" and whatever place the text cursor happens to be prints "X".
Jump to Post
There is no "general" way to do it because it is operating system specific. C and C++ do not themselves have direct support for keyboards and mice.
You could use ncurses which has been ported to both MS-DOS and *nix (there is not MS-Windows gui version of it).
All 2 Replies
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.