press_key
Simulates a key press or keyboard shortcut in an Electron app, with optional modifiers and selector focus, to test interactions during debugging.
Instructions
Press a key or shortcut (Enter, Escape, Tab, Arrow*, or a character) with optional modifiers
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 name, e.g. "Enter", "Escape", "a", "Tab", "ArrowDown" | |
| repeat | No | ||
| selector | No | Optional CSS selector to focus before keypress | |
| targetId | No | ||
| modifiers | No | Modifier keys, e.g. ["Control"] for Ctrl+A | |
| processId | No | Target process ID. Omit if only one app is running. |