### Modes of operation

The command line editor is an area of the screen that opens up whenever the user needs to input data on the calculator. Also, for an object already on the stack, the command line editor can be invoked using the keyboard shortcut DN (down keypad arrow).

The command line has several different modes of operation, indicated by the letter of the blinking cursor. The editor will switch between modes of operation automatically most of the time based on context. The user can manually switch by using the ENTRY key (RS-Alpha).

#### 'D' - Direct mode

When a number is first pressed, the editor opens up in direct mode. In this mode, commands and operations will close the editor, compile what was typed, and perform the operation all in a single keystroke. For example typing 2 and pressing 1/X will immediately produce an answer of 0.5.

#### 'A' - Algebraic mode

This mode is specifically for entering symbolic expressions. It is activated when the user types the single quotes '', or it can be entered into manually using ENTRY. In this mode, commands and operators will not perform their functions, but rather will insert themselves into the expression as text. For example pressing SIN in this mode will insert the text SIN().

#### 'P' - Programming mode

This is the default mode for programming in RPL, it is activated automatically when the user enters the program delimiters « ». In this mode, functions and operators will be inserted into the editor as commands, and automatically separated with spaces. For example pressing SIN in this mode will insert the text SIN separated with spaces as needed.

#### 'C' or 'L' - Alphanumeric mode

This is the preferred mode for entering arbitrary text. It is activated manually using ALPHA, or automatically when the user inserts the double quotes "". In this mode most keys will insert letters, numbers and symbols. The 'C' in the blinking cursor stands for Capitals, and will produce capital letters. On the other hand 'L' stands for Lowercase, and will insert lowercase letters. To switch between 'C' and 'L' modes, press the ALPHA key once. A second press of ALPHA without pressing any other key in between will disable alphanumeric mode, and return to the previous mode. To temporarily alternate between 'C' and 'L', press ALPHAhold, and the cursor will change from 'C' to 'L' or vice versa. This change is only temporary while holding ALPHA and pressing other keys. When releasing ALPHA the mode will revert back. Alphanumeric mode can also be used temporarily. When in any other mode, press ALPHAhold key and the cursor will change to 'C' or 'L'. Without releasing ALPHA you can type letters and symbols. Upon releasing ALPHA, the editor will return back to the previous mode of operation, ending alphanumeric mode.

To move the cursor through the text, use the cursor keys in the keyboard. Depending on the shifts, they will perform different operations:

• Cursors: Move one character left, right, up or down.
• Cursor right at the end of the line: It will move to the start of the next line.
• RS-RT: Moves to the end of the current line.
• RS-LF: Moves to the start of the current line.
• RS-UP: Moves to the first line of text.
• RS-DN: Moves to the last line of text.
• RShold-UP: Moves up one page of text.
• RShold-DN: Moves down one page of text.
• RShold-RT: Moves right one page.
• RShold-LF: Moves left one page.

### Autocompletion of commands

When the user is typing text, the status area will offer suggestions to quickly type RPL commands based on the partial word immediately to the left of the cursor. For example, pressing the key X will insert the letter X into the editor, and immediately suggest XROOT in the status area. If the partial word typed doesn't match any RPL commands, there will be no suggestion in the status area.
When a suggestion is being displayed, the following keys become active:

• Alphahold-UP: Shows the previous suggestion.
• Alphahold-DN: Shows the next suggestion.
• Alphahold-RT: Insert the suggestion into the editor.

The autocomplete feature works best when the editor is in programming mode 'P', used in combination with the temporary alphanumeric mode. For example, Press ALPHAhold, then press C to get suggested CMP, then pressing O will suggest COPYCLIP, and finally pressing RT will insert COPYCLIP into the editor. Now you can release ALPHA to return to programming mode.

### Text selection and copy/paste operations

To select text when inside the editor, use the following keys:

• LS-LF: Define the start of the selection at the cursor location.
• LS-RT: Define the end of the selection at the cursor location.
• LShold-LF: Copy the selection to the clipboard.
• LShold-RT: Paste the clipboard at the cursor location.
• LShold-DN: Cut the selection into the clipboard.

The clipboard is also shared with the stack, so objects from the stack can be pasted into the editor and text from the editor can be pasted into the stack.

### Using the menus while in the editor

When the editor is open, the menu keys behave slightly different from their actions when at the stack. For complete information see The Vars Menu. This section has a summary of the menu workings when in the editor.

Most commands in the menu will insert the command name to the command line. When the editor is in algebraic mode A, some commands will be inserted as a function, including opening and closing parenthesis.

If the menu is showing variables, using the menu tab will insert the name of the variable in the editor.

When using left or right shift (which normally do STO and RCL respectively), the STO or RCL will also be inserted.

Finally, when using RShold-menukey the content of the variable will be inserted as text in the editor.

If the menu tab is displaying a directory, the menu key will change to the directory instead of inserting it's name. This allows traversing directories while editing text, transparently. The LS-UP (UPDIR) and LShold-UP (HOME) are also active during the editing session.

• manual/chapter2/cmdline.txt