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 parameters | Input parameter type | Description |
|---|---|---|
| Webpage Object | WebPage | Target webpage, usually returned by Open Webpage or Get Open Webpage |
| Shortcut | jsonArray | Key-event array in actual press-and-release order. Each item contains type, code, and delay; see the format below |
| Post-Input Delay | number or str | Time 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:
| Field | Type | Description |
|---|---|---|
| type | str | "down" to press the key or "up" to release it |
| code | int or str | Windows virtual-key code. Common values include Ctrl: 162, A: 65, C: 67, V: 86, Enter: 13, Tab: 9, and Delete: 46 |
| delay | number or str | Delay 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:
| Key | code |
|---|---|
| Ctrl | 162 or 163 |
| Alt | 164 or 165 |
| Shift | 160 or 161 |
| Tab | 9 |
| Enter | 13 |
| Esc | 27 |
| Backspace | 8 |
| Delete | 46 |
| Left / Up / Right / Down | 37 / 38 / 39 / 40 |
| A-Z | 65-90 |
| 0-9 | 48-57 |
| F1-F12 | 112-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
- 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.