Support cursor movement
update code & doc