Skip to content

SendKeyCombination.cs

Avrigeanu Laurian edited this page Apr 14, 2023 · 2 revisions

SendKeyCombination(keyShorts: VirtualKeyShort[]) : void

Parameters

  • keyShorts: An array of VirtualKeyShort enums representing the key combination to be sent.

Returns

  • void.

Remarks

  • This method sends a key combination to the current active window.
  • It uses the FlaUI.Core.Input.Keyboard.Pressing method to simulate the key press, and it uses the Polly library to retry the operation if it fails.
  • The number of retries and the time span between them are defined by the retryCount and RetryTimeSpan variables.
  • If the operation fails, an error message is printed to the console, and the method will retry until it succeeds or the maximum number of retries is reached.
Clone this wiki locally