Skip to main content

Send Web Shortcut

Command description

Send key-down and key-up events to a webpage through Chrome CDP, without bringing the browser to the foreground. This supports shortcuts such as Ctrl+A, Ctrl+C, Ctrl+V, Enter, Tab, Delete, and the arrow keys.

This command targets the webpage rather than a specific element. To send a shortcut to an input field, editor, or button, focus that element first with a command such as Click Web Element.

For ordinary text, use Input into Web Element. For the current system focus or a desktop application, use Keyboard Input.

Command Input Parameters

input parametersInput parameter typeDescription
Webpage ObjectWebPageTarget webpage, usually returned by Open Webpage or Get Open Webpage
ShortcutjsonArrayKey-event array in actual press-and-release order. Each item contains type, code, and delay; see the format below
Post-Input Delaynumber or strTime to wait after sending the shortcut before continuing, in seconds; default: 1

Command Output Parameters

None

Shortcut key format description

Shortcut must be a native JSON array, not written as a Python expression string. Each item in the array represents a key event:

FieldTypeDescription
typestr"down" to press the key or "up" to release it
codeint or strWindows virtual-key code. Common values include Ctrl: 162, A: 65, C: 67, V: 86, Enter: 13, Tab: 9, and Delete: 46
delaynumber or strDelay after the previous event, in milliseconds; may be 0

Key combinations must preserve the actual sequence: press the modifier, press the main key, release the main key, then release the modifier. For example, Ctrl+A is Ctrl down, A down, A up, Ctrl up.

Commonly used virtual key codes:

Keycode
Ctrl162 or 163
Alt164 or 165
Shift160 or 161
Tab9
Enter13
Esc27
Backspace8
Delete46
Left / Up / Right / Down37 / 38 / 39 / 40
A-Z65-90
0-948-57
F1-F12112-123

AI Generation Notes

  • This command does not focus an input field automatically. Add a click or focus step first when the shortcut must target a specific field or editor.
  • This command is for shortcuts and key events, not ordinary text. Use "Input into Web Element" for text input.
  • The shortcut array must contain both press and release events.

Ctrl+A Example

{
"children": [],
"in": {
"Webpage Object": "webPage",
"Shortcut": [
{
"type": "down",
"code": 162,
"delay": 0
},
{
"type": "down",
"code": 65,
"delay": 0
},
{
"type": "up",
"code": 65,
"delay": 120
},
{
"type": "up",
"code": 162,
"delay": 120
}
],
"Post-Input Delay": "1"
},
"out": {},
"comments": "Press Ctrl+A to select all in the web page",
"ins": "Send Web Shortcut"
}

Press Enter Example

{
"children": [],
"in": {
"Webpage Object": "webPage",
"Shortcut": [
{
"type": "down",
"code": 13,
"delay": 0
},
{
"type": "up",
"code": 13,
"delay": 80
}
],
"Post-Input Delay": "1"
},
"out": {},
"comments": "Press Enter on the web page",
"ins": "Send Web Shortcut"
}

Type definition reference

tip
  • Install the Runavelo browser extension before using this command.
  • This command sends key events through Chrome CDP without taking control of the mouse or bringing the browser window to the foreground.
  • If the shortcut does not work, confirm that the target webpage or input field has focus and that the browser extension is connected.

FAQ

See Web Automation FAQ