press_key
Send special keyboard keys like ENTER, TAB, or ESCAPE to the active page or a targeted element to trigger actions or navigate forms.
Instructions
Send special keyboard keys (ENTER, TAB, ESCAPE, BACK_SPACE, ARROWS, etc.) to page or element.
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_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Special keyboard key to press | |
| selector | No | Optional element selector to send the key to. If omitted, sends to active element/body. | |
| strategy | No | Strategy to find element (css, xpath, id, name, tag, class, text, partialText). Default: css | css |