send_key
Sends a named key or virtual key code to the Connect IQ simulator window, with optional hold timing, post-press screenshot capture, and change/no-op assertions.
Instructions
Send a platform virtual key code or named key ('enter', 'esc', 'up', 'down', 'menu', 'space') to the Connect IQ simulator window.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "send_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | Key name or alias (e.g. 'enter', 'return', 'select', 'esc', 'back', 'up', 'down', 'menu', 'space') | |
| expect | No | Assert the outcome: 'change' fails with E_NO_CHANGE when the screen is identical, 'noop' fails with E_UNEXPECTED_CHANGE when it differs | |
| hold_ms | No | Key hold duration in milliseconds (default: 80) | |
| wait_ms | No | Milliseconds to wait after key press before capturing screenshot (default: 350) | |
| key_code | No | Platform virtual key code (Windows and macOS use different codes) | |
| device_id | No | Device profile ID (defaults to active device) | |
| settle_ms | No | Milliseconds to wait before the after-capture used for the receipt (default: 400) | |
| capture_after | No | Whether to capture and return a screenshot after key press (default: false) |