qt_key_press
Send key events to widgets in PySide6 applications for automated testing and interaction. Specify a key name and optional widget reference to simulate keyboard input.
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 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |