As long as you leave control over these things to the terminal, yes. But what if your program wants to control that itself? E.g. react to keystrokes, rather than edited lines, as the OP seemed to want?