Get Key Status

This is a pre-built Action located under the @Generic Element. The functionality of this action in Avo Assure is to check whether Num Lock, Caps Lock, and Scroll Lock keys are ON or OFF. The result is stored in the given dynamic variable for further use during test execution.

Syntax

Input Value: <Toggle key>

Argument
Description

<Toggle key> (Required)

Provide the name of the toggle key whose status you want to check.

 Note: Below are the supported toggle keys:

  • Caps: Checks the status of Caps Lock

  • Num: Checks the status of Num Lock

  • Scroll: Checks the status of Scroll Lock

Output Value: <Dynamic Variable>(Optional);<Dynamic Variable>(Optional)

Argument
Description

<Dynamic Variable>(Optional);<Dynamic Variable>(Optional)

Both dynamic variable stores the status as True or False.

Example: Checking the Status of a Toggle Key

In this example, we explain how to verify whether a specific toggle key (e.g., Caps Lock) is active.

  • Action: Get Key Status

  • Input Value: Caps

    • The argument (Caps) specifies the toggle key whose status needs to be checked.

  • Output Value: {Status}

    • The result of this action is stores in the {Status} dynamic variable, with the following possible values:

      • True: If the key status is retrieved successfully.

      • False: If the retrieval fails or an error occurs.

  • Logical Explanation: The Get Key Status action reads the key name from the Input Value column (Caps). It checks whether the specified toggle key is currently active or inactive. The result (True) is stored in the {Status} variable.

Last updated

Was this helpful?