TX Text Control .NET Server

SendKeyDown Method

Method|Introduced in 21.0
Namespace
TXTextControl.ServerVisualisation
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Server.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.Server.dll

Description

Informs the view generator about a key down event.

Syntax

public bool SendKeyDown(int keyCode, UserInput.ModifierKeys modifierKeys);

Parameters

ParameterDescription
keyCode

Specifies the virtual key code for the pressed key.

modifierKeys

Specifies modifier keys. It can be a combination of the ServerVisualization.UserInput.ModifierKeys values.

Return Value

If the event has been handled, the method returns true. Otherwise, it returns false.

Examples

The following example uses Send Key Down in a focused User Input workflow.

if (userInput.SendKeyDown(10, TXTextControl.ServerVisualisation.UserInput.ModifierKeys.Shift))
{
    Console.WriteLine("Send Key Down completed successfully.");
}