CALC 1 Home Documentation Home Contact


CALC 1 Key Editor

The Key Editor is similar adding a number in the Contacts app that comes with your iPhone. You need a label and script instead of a name and phone number.

You can also use the Key Editor to view the key script of a key to better understand it. It is a good source of documentation.

key editor


The key editor screen contains the following fields:

  1. Label: This is the key label that you see on the key. It needs to be short enough to fit on the key.
  2. Hint: The hint is the text that is displayed when the user used the "long press" gesture on the key.
  3. Insert:
  4. Undo: This controls the undo support for this key.
  5. History: This controls the automatic history support for this key. UN-check if the script will provide a custom history item.
  6. Key Type: There are many key types. This document covers the "script" type that is used for customization.
  7. Calc Modes: These properties control the calculation modes that the key will appear. Usually you will leave all checked. This is used for keys like the parenthesis and "K" keys so they will not be displayed in RPN calculation mode.
  8. Key Preview: This is used to indicate that this is part of Calculate-STO-RCL set of keys.
  9. Style Group: The style group of the Styles. This will determine the key image for the key.
  10. Stack Post Op: This has 4 choices to manage the stack after the script is run.

Explanation of how the "Insert" field is used for different calculation modes.

For the √ key shown in the screen shot at the top of this page:

In RPN calculation mode, the "Insert" field is ignored and the script is evaluated as follows:

  1. The script is evaluated and the result (last statement) is assigned to the rgx value.
  2. The StackPost Op will be run.

In ALG calculation mode, the "√(" text is inserted into the current formula and the script is ignored.

In CHN calculation mode, the script is evaluated as in RPN calculation mode.


Tap the Script button to view, edit and test the JavaScript in the Script Editor.

The Toolbar Buttons

More Examples

CALC 1 has hundreds of keys that you can look at for examples.