I want to write a command line shell for a background program, and in witch I can type some commands. I want to add a feature like the bash (or other shell-like) ---'UP' key to get the historic input. How can I capture the 'UP' key was pressed?
If I just use std::getline(std::cin, line)
I can't get the 'UP' key or other function key, ie. Ctrl+w to delete a word of the input line.