The function PostKey posts virtual-key codes to the currently displayed project screen. In other words, it simulates keyboard input.

Function Group Execution Windows Embedded Thin Client Mobile Access
PostKey Module Activity Synchronous Supported Supported Supported Not supported


Web Studio Help tion moduleactivity postkey.xml d156080e109 PostKey
A numerical flag with the following possible values:
Value Description
0 KeyDown event
1 KeyUp event

In most cases, this value should be 0 to indicate that the key is being pressed.

The virtual-key code to be posted, in hexadecimal format.

For a list of codes, go to:

Additional message information.

In most cases, this value should be 0 to indicate that there is no additional information.


If the option Enforce Web functionality equivalence is selected in the project settings, this function cannot be called from Global Procedures or Script worksheets. This is because the function is meaningful only when it is executed on stations that display project screens; it might cause unexpected behavior if it is called from background tasks that are executed on the project runtime server. For more information, see Preferences tab.

Returned value

This function does not return any value.


Post the virtual-key code for the Home key: