Action
Sends a set of keystrokes to the object.
Note: Some keystrokes are not supported on mobile devices.
Valid keystrokes for all other applications include:
- <#0>-<#9> (numeric keypad numbers 0-9 with Num Lock on)
- <#Add> (numeric keypad '+')
- <#Clear> (numeric keypad 5 with Num Lock off)
- <#Decimal> (the key for the decimal separator on the numeric keypad of most keyboards)
- <#Delete> (Numeric keypad '.' with Num Lock off)
- <#Divide> (Numeric keypad '/')
- <#Down> (numeric keypad 2 with Num Lock off)
- <#End> (numeric keypad 1 with Num Lock off)
- <#Enter> (numeric keypad Enter)
- <#Equal> (numeric keypad equals sign)
- <#Home> (numeric keypad 7 with Num Lock off)
- <#Insert> (numeric keypad 0 with Num Lock off)
- <#Left> (numeric keypad 4 with Num Lock off)
- <#PgDn> (numeric keypad 3 with Num Lock off)
- <#PgUp> (numeric keypad 9 with Num Lock off)
- <#Right> (numeric keypad 6 with Num Lock off)
- <#Separator> (numeric keypad Separator key)
- <#Space> (numeric keypad Space key)
- <#Subtract> (numeric keypad '-')
- <#Tab> (numeric keypad Tab key)
- <#Times> (numeric keypad '*')
- <#Up> (numeric keypad 8 with Num Lock off)
- <Alt> (left-side Alt key)
- <Application> (opens a context menu on the last active control)
- <Backspace> (backspace key)
- <Break> (Ctrl-Break)
- <Cancel> (break)
- <CapsLock> (toggle whether it is currently on or off)
- <Clear> (Clear key)
- <Ctrl> (Left-side Ctrl key)
- <Delete> (Delete key)
- <Down> (Down arrow)
- <End> (End key)
- <Enter> (Enter key)
- <Esc> (Escape)
- <Execute> (Execute key)
- <F1> - <F12> (F1 through F12 function keys)
- <F13> - <F35> (F13 through F35 function keys)
- <Greater Than> '>' key (which the agent would otherwise interpret as a right angle bracket)
- <Help> (Help key)
- <Home> (Home key)
- <Insert> (Insert key)
- <Left> (Left arrow)
- <Left Alt> (Alt key)
- <Left Ctrl> (Ctrl key)
- <Left Shift> (Shift key)
- <LeftWin> (Windows Start menu key)
- <Cmd> (Mac OS Command key)
- <Less Than> '<' key (which the agent would otherwise interpret as left angle bracket)
- <Menu> (Menu key)
- <Mode> (Mode key)
- <Pause> (Pause)
- <PgDn> (PgDn or Page Down)
- <PgUp> (PgUp or Page Up)
- <PrtScr> (Print Scrn)
- <Redo> (Redo key)
- <Right> (Right arrow)
- <Right Alt> (Alt key)
- <Right Ctrl> (Ctrl key)
- <RightOption> (Option key)
- <Right Shift> (Shift key)
- <RightWin> (Windows Start menu key)
- <ScrollLock> (typed whether it is currently on or off)
- <Shift> (Left-side Shift key)
- <Space> (Space bar)
- <Tab> (Tab)
- <Undo> (Undo key)
- <Up> (Up arrow).
Note: '<' or '>' needs to be written as '<LessThan>' or '<GreaterThan>'."
Syntax
iKeyable.TypeKeys(keys, [delay, ensureFocus])
Variable |
Description |
keys |
The keystrokes to type. String.
|
delay |
Optional: The delay between keystrokes in milliseconds. Integer.
|
ensureFocus |
Optional: Determines whether it should be ensured that the control actually has the keyboard focus. Defaults to true. Boolean.
|
Examples
Examples: 'a', 'ab', 'a<Enter>', '<F4>', '<Left Shift>', '<Right Alt>', '<Left Ctrl>', '<Delete>', '<Backspace>'.
The following code copies the currently selected text into the clipboard by pressing Ctrl+C:
window.TypeKeys("<Left Ctrl+C>")