press_key
Simulate keyboard input by pressing keys or key combinations, such as Enter, Tab, Escape, or Control+c, in an active browser session to trigger shortcuts and navigation.
Instructions
Press a key or key combination. Supports special keys like Enter, Backspace, Tab, Escape, ArrowUp, etc. For key combinations, use '+' as separator: 'Control+c', 'Control+Shift+a', 'Meta+v' (Cmd on Mac). Common keys: Enter, Backspace, Delete, Tab, Escape, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Home, End, PageUp, PageDown, F1-F12, Control, Shift, Alt, Meta. For single printable characters, prefer type_text instead.
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": {
"session_id": "<session_id>",
"key": "<key>"
},
"name": "press_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | The key or key combination to press. Examples: 'Enter', 'Backspace', 'Tab', 'Escape', 'Control+a', 'Control+c', 'Control+v', 'Meta+a' (Cmd+A on Mac), 'Shift+ArrowRight', 'Control+Shift+k'. Uses Playwright key names. | |
| count | No | Number of times to press the key (default: 1). | |
| session_id | Yes | Session ID from start_browser. |