Cursor position bug fixed,ESC to cancel added