press_key
Trigger keyboard actions in the browser by pressing keys or shortcuts, optionally focusing an element first via selector or ref to ensure correct input.
Instructions
Press a key or shortcut (Enter, Escape, Tab, arrows, Ctrl+K). Optionally focus an element first via ref or selector.
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 | Key to press, e.g. 'Enter'; printable chars as-is | |
| ref | No | Element ref to focus first | |
| selector | No | CSS selector to focus first | |
| modifiers | No | Modifier keys held during the press |