Working with Key Strokes
Last Updated On: April 13, 2020
In software simulations, you often want to simulate keyboard actions that interact with the target software. Key strokes are interaction objects that help you do that by responding when users press a key (combination). When you record software simulations, key strokes are automatically inserted whenever you press a keyboard shortcut.
By default, a key stroke consists of three separate elements: (1) a target area, (2) a Correct message, and (3) an Incorrect message.
When the interactive presentation is played, initially the key stroke displays nothing. It just waits for users to enter a shortcut (such as CTRL+SHIFT+P) while ignoring any text string. If the entered shortcut matches the reference, the Correct message (2) appears, otherwise the Incorrect message (3) appears. For example, if the predefined value is CTRL+SHIFT+P, but a user presses CTRL+P without holding down the SHIFT key, he is doing incorrectly.
Step 3: Click inside the Correct Value text box and press a key with or without the modifier keys to define a value.
If you don’t want a value anymore, click the Remove button (5) next to that value to remove it.
Be sure to fully test your key stroke in the published output to avoid any unexpected behavior. Don’t use keys or key combinations that are common in browsers such as CTRL+F or ALT+D.
By default, key strokes have three events, namely On Correct, On Incorrect, and On Timeout. You can add three other events, namely On Key Press (occurs when each key or combination of keys is pressed), On Rollover, and On Rollout.
For more details, see Working with Events – Actions.
Inserting Key Strokes
To insert a key stroke, click the Interactions tab > Key Stroke. Alternatively, click the Home tab > Interactions > Key Stroke.![Insert a key stroke](https://cdn.atomisystems.com/uploads/2018/06/Insert-a-key-stroke.webp)
![key strokes 02](https://cdn.atomisystems.com/uploads/2018/06/key-stroke-02.webp)