I want key press event to be triggered when prompt to press any key in c++. I did not find any helpful solution to this. Yet I tried "std::cin.get()".
Also I want to trigger key press event in parallel using fork and execl command.
My system is Linux/c++.
Need help to get this ?
Standard C++ doesn't really have anything for handling keyboard events. std::cin is just a stream object that could read from anything (file, network, keyboard, ...) so that's why it doesn't have any functionality specific to keyboards.
You might want to have a look at the ncurses library.
Thanks for reply!
I have gone through ncurses but didn't found helpful as it is graphical based API.
What I want is to press key event with the help of programming only.
Something like "system("pause")" as I am not able to use it properly.
But cannot run it simultaneously with popen command.