Press key
pressSend keyboard keys like Enter, Escape, Tab, or Control+A to a browser page, optionally focusing a target element first so the key reaches the intended control.
Instructions
Press a keyboard key (Enter, Escape, Tab, ArrowDown, Control+A…). Optionally focus a target first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"key": "<key>"
},
"name": "press"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Playwright key name, e.g. Enter or Control+A. | |
| ref | No | Element ref from the latest snapshot, e.g. e12. Preferred over selectors. | |
| confirm | No | Confirm a high-impact action when the server policy is ask. | |
| observe | No | Return a compact change observation after the action (default true). | |
| selector | No | CSS selector (use when no ref is available). |