This section contains rules for key names and a list of key names that PressKeys, ReleaseKeys, and TypeKeys accept as arguments.
These rules apply when you specify key names in scripts.
The following table lists the key names that PressKeys, ReleaseKeys, and TypeKeys accept as arguments.
Platform-specific keys are labeled.
Keystroke | Description |
---|---|
#0 | Numeric keypad 0 with Num Lock on |
#1 | Numeric keypad 1 with Num Lock on |
#2 | Numeric keypad 2 with Num Lock on |
#3 | Numeric keypad 3 with Num Lock on |
#4 | Numeric keypad 4 with Num Lock on |
#5 | Numeric keypad 5 with Num Lock on |
#6 | Numeric keypad 6 with Num Lock on |
#7 | Numeric keypad 7 with Num Lock on |
#8 | Numeric keypad 8 with Num Lock on |
#9 | Numeric keypad 9 with Num Lock on |
#Add | Numeric keypad "+" |
#Clear | Numeric keypad 5 with Num Lock off. Not supported on the X Window System. |
#Decimal |
For the Open Agent, this key represents the key for the decimal separator on the numeric keypad of most keyboards. When recording, the Open Agent records the actual character that results from pressing that key. For example, if you record using an English keyboard, Silk Test Classic records a TypeKeys("."). For a German keyboard, Silk Test Classic records a TypeKeys(","). For replaying, use #Decimal. Depending on the currently selected keyboard layout, Windows decides what character to create. For example, on an English keyboard, Silk Test Classic records '.' for TypeKeys("<#Decimal>") and on a German keyboard, Silk Test Classic records ','. |
#Delete | Numeric keypad "." with Num Lock off. Not supported on the X Window System. |
#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. Not supported on Windows. |
#Home | Numeric keypad 7 with Num Lock off |
#Insert | Numeric keypad 0 with Num Lock off |
#Left | Numeric keypad 4 with Num Lock off. Not supported on the X Window System. |
#Period |
Numeric keypad "." with Num Lock on. This key represents the key for the decimal separator on the numeric keypad of most keyboard layouts. However, for some non-English languages, such as German, the decimal separator is a comma ',' and therefore the name period is unclear. For example, with the Classic Agent, Silk Test Classic records a <#Period> on an English keyboard and an ',' on a German keyboard. #Period is deprecated for use with the Open Agent. Using #Decimal rather than #Period is recommended on the Open Agent. |
#PgDn | Numeric keypad 3 with Num Lock off |
#PgUp | Numeric keypad 9 with Num Lock off |
#Right | Numeric keypad 6 with Num Lock off. Not supported on the X Window System. |
#Separator | Numeric keypad Separator key. Supported on the X Window System only. |
#Space | Numeric keypad Space key. Supported on the X Window System only. |
#Subtract | Numeric keypad "-" |
#Tab | Numeric keypad Tab key. Supported on the X Window System only. |
#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. Supported on Windows only. |
Cancel | Break |
CapsLock | Caps Lock (toggle whether it is currently on or off) |
CapsLockOff | Caps Lock Off (typed only if it is currently on). Not supported on the Open Agent. |
CapsLockOn | Caps Lock On (typed only if it is currently off). Not supported on the Open Agent. |
Clear | Clear key. Supported on the X Window System only. |
Ctrl | Left-side Ctrl key |
Delete | Delete key |
Down | Down arrow |
End | End key |
Enter | Enter key |
Esc | Esc (Escape) |
Execute | Execute key. Supported on X Window System only. |
F1 | F1 function key |
F2 | F2 function key |
F3 | F3 function key |
F4 | F4 function key |
F5 | F5 function key |
F6 | F6 function key |
F7 | F7 function key |
F8 | F8 function key |
F9 | F9 function key |
F10 | F10 function key |
F11 | F11 function key |
F12 | F12 function key |
F13 | F13 function key. Supported on the X Window System only. |
F14 | F14 function key. Supported on the X Window System only. |
F15 | F15 function key. Supported on the X Window System only. |
F16 | F16 function key. Supported on the X Window System only. |
F17 | F17 function key. Supported on the X Window System only. |
F18 | F18 function key. Supported on the X Window System only. |
F19 | F19 function key. Supported on the X Window System only. |
F20 | F20 function key. Supported on the X Window System only. |
F21 | F21 function key. Supported on the X Window System only. |
F22 | F22 function key. Supported on the X Window System only. |
F23 | F23 function key. Supported on the X Window System only. |
F24 | F24 function key. Supported on the X Window System only. |
F25 | F25 function key. Supported on the X Window System only. |
F26 | F26 function key. Supported on the X Window System only. |
F27 | F27 function key. Supported on the X Window System only. |
F28 | F28 function key. Supported on the X Window System only. |
F29 | F29 function key. Supported on the X Window System only. |
F30 | F30 function key. Supported on the X Window System only. |
F31 | F31 function key. Supported on the X Window System only. |
F32 | F32 function key. Supported on the X Window System only. |
F33 | F33 function key. Supported on the X Window System only. |
F34 | F34 function key. Supported on the X Window System only. |
F35 | F35 function key. Supported on the X Window System only. |
Find | Find key. Supported on the X Window System only. |
Greater | ">" key (which the agent would otherwise interpret as a right angle bracket) |
Help | The Help key. Supported on the X Window System only. |
Home | Home key |
Insert | Insert key |
Left | Left arrow |
LeftAlt | Alt key |
LeftCtrl | Ctrl key |
LeftShift | Shift key |
LeftWin | Windows Start menu key |
Less | "<" key (which the agent would otherwise interpret as left angle bracket) |
Menu | Menu key. Supported on the X Window System only. |
Minus | "-" key. Not supported on the Open Agent. Use #Subtract or '-' with the Open Agent. |
Mode | Mode key. Supported on the X Window System only. |
NumLock | Num Lock (typed whether it is currently on or off). Not supported on the Open Agent. |
NumLockOff | Num Lock Off (typed only if it is currently on). Not supported on the X Window System or the Open Agent. |
NumLockOn | Num Lock On (typed only if it is currently off). Not supported on the X Window System or the Open Agent. |
Pause | Pause |
PgDn | PgDn or Page Down |
PgUp | PgUp or Page Up |
PrtScr | Print Scrn |
Redo | Redo key. Supported on the X Window System only. |
Right | Right arrow |
RightAlt | Alt key |
RightCtrl | Ctrl key |
RightOption | Option key. Not supported on the X Window System. |
RightShift | Shift key |
RightWin | Windows Start menu key |
ScrollLock | Scroll Lock (typed whether it is currently on or off). |
ScrollLockOff | Scroll Lock (typed only if it is currently on). Not supported on the X Window System or the Open Agent. |
ScrollLockOn | Scroll Lock (typed only if it is currently off). Not supported on the X Window System or the Open Agent. |
Shift | Left-side Shift key |
Space | Space bar |
Tab | Tab |
Undo | Undo key. Supported on the X Window System only. |
Up | Up arrow |