Topic 6.2.3: Key Script
Configuring Key Scripts
Key scripts are scripts that are linked to the pressing of a specific key or key combination. You can use key scripts to:
- Execute a script one time when a key or key combination is pressed.
- Execute a script periodically while a key or key combination is pressed and not released.
- Execute a script one time when a key or key combination is released.
A key script is identified by the name of key that initiates the script. For example: Ctrl+q.
Note: If you have configured an action script that uses the same key or key combination to trigger it, the key script is ignored and instead the action script is executed.
To configure a key script
1. Using the Classic View, in the Scripts pane, do one of the following:
- To configure a new key script, right-click Key, and then click New. The Key Scripts dialog box appears.
- To configure an existing key script, expand Key, right-click the script name, and then click Edit. The Edit Key Script dialog box appears.
2. Click Key and select a key from the Choose Key dialog box.
3. Select the Ctrl and/or Shift check boxes to assign a control key and/or shift key combination with your selected key.
4. In the Condition Type list, do one of the following:
- Click On Key Down to configure a script to execute one time when the associated key or key combination is pressed.
- Click While Down to configure a script to execute periodically while the associated key or key combination is pressed.
- Click On Key Up to configure a script to execute one time when the associated key or key combination is released.
5. If you selected While Down in the previous step, type a time interval between 1 and 360000 milliseconds in the Every box.
6. Type your script in the window.
7. Click OK.
To delete all key scripts associated with a key
- Using the Classic View, in the Scripts pane, expand Key, right-click the key script name, and then click Delete. When a message appears, click Yes.
To delete a key script that is associated with a key
1. Using the Classic View, in the Scripts pane, expand Key, right-click the key script name, and then click Edit. The Edit Key Script dialog box appears.
2. In the Condition Type list, click the script trigger for the script to delete. The script appears in the main section of the Edit Key Script dialog box.
3. On the Edit menu, click Clear. The script from the main section clears and the associated script is deleted.