Press key
pressPress keyboard keys like Enter, Tab, or Escape on a web page element. Target a specific element with a selector or the currently focused element.
Instructions
Press a keyboard key such as 'Enter' (submit a form), 'Tab', or 'Escape'. With selector the key is sent to that element; without it, to the focused element. Supports Playwright key syntax (e.g. 'Control+A').
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 | Key to press, e.g. 'Enter', 'Tab', 'Escape', 'Control+A' | |
| selector | No | Element to focus + press against; omit to press the focused element |