sendKeys method

Top  Previous  Next

The sendKeys method is a wrapper of the hllapi.js sendKey function. It is used to send either a keystroke or a string of keystrokes to the host screen.

You have to define the string of keystrokes sent with the calling data string parameter. The keystrokes appear to the target session as though they were entered by the terminal operator. You can also send all attention identifier (AID) keys such as Enter and so on. All host fields that are input-protected or are numeric only, must be treated accordingly.

 

 

Call Parameters

 

Parameter name

Explanation

value

A string of keystrokes, maximum 255. Uppercase and lowercase ASCII characters are represented literally. Function keys and shifted function keys are represented by mnemonics.

 

 

Return Properties

 

Property name

Explanation

returnCode

A numeric code indicating the execution status of the function. Please refer to the Return Code table below for all possible values.

 

 

Return Code

 

The following values are defined for the 'returnCode' property:

 

Return Code

Explanation

0

The keystrokes were sent; status is normal.

1

Your program is not connected to a host session.

 

Remarks

 

1.If the host is busy, input might be rejected.
2.The keystroke strings, including the AID key, are sent to the host via multiple paths. Each path sends the strings before the first AID key (or including the AID key). HLLAPI adjusts the string length and the start position of each path. For a host application program, any keystroke might be lost by the AID key process. Therefore, you should not send a keystroke list that includes plural AID keys.
3.During the @P (Print) or @A@T (Print Presentation Space) process, all requests that update the host screen are rejected. If the presentation space is busy or the interruption request occurs during the print request, the mnemonic @A@R (Device Reset - Cancel to print the Presentation Space) cancels the request and resets the status.