qt_key_press
Sends a key event such as 'Ctrl+S' or 'Return' to a specific Qt widget or the currently focused widget, letting an AI agent trigger shortcuts and keyboard input in running Qt applications.
Instructions
Send a key event to a widget or the focused widget.
Args: key: Key name (e.g., 'Return', 'Escape', 'Ctrl+S', 'a'). ref: Widget ref. If omitted, sends to the currently focused widget.
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": "qt_key_press"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| ref | No | ||
| instance | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |