title: How to let terminal echo only graphic characters in raw&echo mode?
body: <p>I am writing a shell. I put the terminal into raw mode and turned on ECHO flag using tcsetattr().
  Now I have spent much energy repainting the editing-line to erase the mess echo like '^[[A' when user type a function key.</p>
  
  <p>Is there a way to let terminal only echo visible characters?
  I have checked the manual of termios carefully, but find no result.</p>
  
  <p>Any suggestion is welcomed.</p>