DocumentTools/Canvas/Script/Cursor - Maple Help

DocumentTools[Canvas][Script]

 Cursor
 cursor movement script command

 Calling Sequence Cursor(script,position)

Parameters

 script - DocumentTools:-Canvas:-Script object position - string keyword

Description

 • The Cursor command allows you to record cursor movement script commands intended for use in playback within the Maple Learn environment, and are invisible to operation within Maple.
 • Some cursor script commands are as follows:

 n (where n is an integer) Move to position n in the current horizontal run (starting at zero). Down Cursor down (May move between math containers) Up Cursor up (May move between math containers) Left Cursor left Right Cursor right End Move to the very end of the expression Home Move to the very start of the expression ENDPOS Move to the end of current horizontal run. This is not necessarily the end of the expression. With the cursor on the + in (a+b)/(c-d), ENDPOS would move to after the b POSLEFT decrement position in current horizontal run. Does not obey traversal rules like Left would. Stays in current horizontal run. POSRIGHT increment position in current horizontal run. Does not obey traversal rules like Right would. Stays in current horizontal run. FOCUSUP Go up one level of nesting. E.g. from inside a sqrt sign to the surrounding expression or from the denominator of a fraction to the surrounding expression. New cursor position within the outer expression is undefined, so this should be followed by POS or similar ID:id Find first occurrence of id in current horizontal run, starting from the left. Position cursor before that occurrence. An id is specified as an id on the MathML tag, on input. I.e. $1x$ IDEND:id Find first occurrence of id in current horizontal run, starting from the right. Position cursor behind that occurrence

Examples

 > $\mathrm{with}\left(\mathrm{DocumentTools}:-\mathrm{Canvas}\right):$
 > $\mathrm{sc}≔\mathrm{Script}\left('\mathrm{mode}'='\mathrm{Learn}'\right):$
 > $\mathrm{SetActive}\left(\mathrm{sc},"0:0"\right)$
 > $\mathrm{Cursor}\left(\mathrm{sc},"End"\right)$
 > $\mathrm{cv}≔\mathrm{NewCanvas}\left(\left["Title"\right],\mathrm{sc}\right):$
 > $\mathrm{ShareCanvas}\left(\mathrm{cv}\right)$

Compatibility

 • The DocumentTools[Canvas][Script][Cursor] command was introduced in Maple 2021.