This function sends a host key to the server in a Genie session.
Parameters:
- key - description of key (not case sensitive); valid values are "Enter", "F1" to "F24", "PageUp", "PageDown", "Disconnect" or "Quit", "Attn", "SysReq", "ErrorHelp", "Help", "Print", "RollLeft", "RollRight", and "Clear"
- on timeout flag or additional keys - this second parameter is optional; if the second parameter is passed as True, the key is sent after a small timeout allowing other JavaScript code to finish running first; alternatively,multiple parameters can be used to send additional keys on subsequent screens effectively causing a multi-step action
Examples:
pressKey("Enter"); // send the enter key
setCursor(24, 1); pressKey("F1"); // set cursor to line 24 and send F1
pressKey("Enter", true); // send the enter key on a timeout
pressKey("Enter", "F3"); // send the enter key, then the F3 key