There exist 3 text-entry modes in the Treescript code editor:
1. Free Form
2. Structure Editor
3. Code Menu
Pressing Esc toggles between Free Form and Structure Editor modes. Pressing F1 displays context-sensitive help in all modes. Pressing the question mark (?) enters Code Menu Mode, in which a menu of available context-sensitive options is displayed. Selecting an option may bring up another, lower-level menu, which may lead to yet another lower-level menu, and so on.
Structure Mode Commands
A bottom-level token (e.g. a keyword, identifier, operator, or constant) or an entire list is often highlighted. Using the Shift key in conjunction with the Up/Down Arrow keys, it is possible to select more than one token/list at a time.
· Esc – toggle between Free Form and Structure Editor modes
· Up Arrow - go to previous list element
· Down Arrow - go to next list element
· Left Arrow - go to parent list
· Right Arrow - go to first child element (if none, display text cursor following current bottom-level token)
· Shift+Up/Down Arrow - select a range of tokens/lists
· Printable Char. - incrementally select valid matching menu item (if any)
· Backspace - undo insertion of previous printable char.
· Delete - delete current token/list
· Enter - display text cursor, insert space after cursor (or insert result of incremental menu selection)
· Space - display text cursor, insert space before cursor (or insert result of incremental menu selection)
· Ctrl+Enter – if at end of line, append blank line (otherwise break line into 2 lines)
Code Menu Commands
A popup menu above or below text cursor (and including text cursor) is displayed. The contents of this menu include all valid code elements in the context of the text cursor (ignoring anything after the text cursor). If the current menu item refers to a list, the entire list is highlighted (defaults to light gray if background color of whitespace is white).
· Question Mark - toggle between Code Menu and Free Form/Structure Editor modes
· Esc - show/hide code menu
· Up Arrow - move selection up (scroll up after pressing Esc)
· Down Arrow - move selection down (scroll down after pressing Esc)
· Left Arrow - go to parent code menu
· Right Arrow - go to lower-level code menu, if any
· Enter - go to lower-level code menu (if none, insert current menu item, go to next menu item, or if none, go to parent code menu)
· Space - go to lower-level code menu (if none, insert current menu item, go to next menu item, or if none, go to parent code menu; exit Code Menu mode)
· Printable Char. - incrementally select matching menu item
· Backspace - undo operation of previous printable char.
· Page Up - page up after pressing Esc
· Page Down - page down after pressing Esc
· Shift Arrow – only used if current menu item is repeated, such as a statement in a block, a declaration, or a parameter in a parameter list
· Shift Up Arrow – select previous instance of current menu item
· Shift Down Arrow - select next instance of current menu item
· Shift Left Arrow – insert above current menu item
· Shift Right Arrow - insert below current menu item
· Semicolon – toggle parent list: multi-line/single-line