SYS_SEND_KEYS()
Syntax
SYS_SEND_KEYS( String_of_Keys as C )
Argument | Description | |||
| String_of_Keys | The keystrokes to process. To specify a particular keyboard character, use the character itself (e.g., D for the D key). | |||
Key | Code | Key | Code | |
backspace caps lock delete end esc home left arrow page down print screen scroll lock up arrow F2 F4 F6 F8 F10 F12 | {BACKSPACE} or {BS} or {BKSP} {CAPSLOCK} {DELETE} {end} {ESC} {HOME} {LEFT} {PGDN} {PRTSC} {SCROLLOCK} {UP} {F2} {F4} {F6} {F8} {F10} {F12} | break clear down arrow enter help insert num lock page up right arrow tab F1 F3 F5 F7 F9 F11 | {BREAK} {CLEAR} {DOWN} {ENTER} {HELP} {INSERT} {NUMLOCK} {PGUP} {RIGHT} {TAB} {F1} {F3} {F5} {F7} {F9} {F11} | |
| To include special characters that are not displayed when a key is pressed (such as ENTER or TAB ) and other keyboard actions, use one of the following special key codes. You can use each regular key in combination with the special keys: SHIFT, CTRL, and ALT. To specify a combination key press, precede the regular key code with one of the following special key codes: | |||
Key | Code | |||
shift | + or SHIFT- | |||
ctrl | ^ or CTRL- | |||
alt | % or ALT- | |||
For example, to send Ctrl-M, use "{^M}", or "{CTRL-M}". To send Shift-Ctrl-V use "{Shift-Ctrl-V}" or "{ + ^V}". | ||||
Description
SYS_SEND_KEYS() sends the specified keys to the active window. The String_of_Keys parameter is a character string that can include one or more keys, as well as special extended keys like function keys and cursor keys.
Limitations
Desktop applications only.
Example
This script can be attached to OnArrive event for a field on a form. It will move the insertion point to the beginning of the field.
sys_send_keys("{f2}{home}") |
See Also
System Functions, Insert Key Codes, OnKey Events on Forms
Supported By
Alpha Five Version 5 and Above