Use Left or Right Control key in your Simulation Flow / Workload

In case you need to use a particular Control key in your Simulation Flow / Workload. To do so you need to add the Free Code action from the LoadGen Studio Recorder Toolbox

Name the Free Code action and add it code below. Change the Action key which in this example is the Escape key.

' Control Key down '
DuafHost.KeyDown("LControlKey")
System.Threading.Thread.Sleep(TypeRate)

' Action key '
DuafHost.KeyDown("Escape")
System.Threading.Thread.Sleep(TypeRate)
DuafHost.KeyUp("Escape")
System.Threading.Thread.Sleep(TypeRate)

' Control Key up '
DuafHost.KeyUp("LControlKey")
System.Threading.Thread.Sleep(TypeRate)
Was this article helpful?
0 out of 0 found this helpful