I want to write a command line shell for a background program, and in witch I can enter some commands. I want to add a function like bash (or another shell) --- "UP" to get historical input. How can I press the UP key?
If I just use std::getline(std::cin, line) , I cannot get the "UP" key or another function key, i.e. Ctrl + w to remove a word from the input line.
source share