Write routine and bind it to move cursor to previous window