The problem is solved when I changed $TERM to xterm, Backspace to "Auto-Detect", Delete to "Auto-Detect". Thanks for your advice. Guo Yixuan