Forum Discussion

donald_baechtel's avatar
donald_baechtel
New Contributor
9 years ago
Solved

Sys.Desktop.Keys("[Hold]~d");

  • What does the following do?
  • Sys.Desktop.Keys("[Hold]~d");
  • I cannot find what "[Hold]" does.
  • Holds the alt and d keys...see article here for more information.

     

    "

    To simulate simultaneous pressing of several keys, use the [Hold] constant. For instance, [Hold][Win]e will launch Windows Explorer.

    To deactivate [Hold], use the [Release] and [ReleaseLast] constants. [ReleaseLast] signals to TestComplete that it should simulate the releasing of the last pressed key. For instance, the string [Hold]^f[ReleaseLast]U indicates the following sequence of keypresses: pressing of CTRL, pressing of F, releasing of F, pressing of U, releasing of U and CTRL.

    [Release] simulates the release of all pressed keys. For example, the string [Hold]^fU[Release] (or [Hold]^fU) indicates that TestComplete should press CTRL, then press F, then press U and then release all these keys.

    "

     

1 Reply

  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor

    Holds the alt and d keys...see article here for more information.

     

    "

    To simulate simultaneous pressing of several keys, use the [Hold] constant. For instance, [Hold][Win]e will launch Windows Explorer.

    To deactivate [Hold], use the [Release] and [ReleaseLast] constants. [ReleaseLast] signals to TestComplete that it should simulate the releasing of the last pressed key. For instance, the string [Hold]^f[ReleaseLast]U indicates the following sequence of keypresses: pressing of CTRL, pressing of F, releasing of F, pressing of U, releasing of U and CTRL.

    [Release] simulates the release of all pressed keys. For example, the string [Hold]^fU[Release] (or [Hold]^fU) indicates that TestComplete should press CTRL, then press F, then press U and then release all these keys.

    "