Application icon

Test Key State

This statement is used to modify the action test state based on a selected modifier key being pressed or not pressed.

The action test state is set as follows:

Set
The test state will be set to the result.
And
If the result is false, the action test state will be set to false, otherwise it will not be modified.
Or
If the result is true, the action test state will be set to true, otherwise it will not be modified.

You can choose to save the results of the test to the per file action test state or a track variable for each active file. When doing so, the Set, And, Or semantics are applied, therefore cumulative tests will be saved as expected. The result stored to a track variable will always be a 0 or 1. See the if - else - endif statement for additional information.

eg. Test if the Command key is pressed and the Shift key is not pressed: