Handle basic cursor movement codes