cocos_type_preview
Simulate keyboard input to type text into focused UI elements for testing forms, chat boxes, and name fields in Cocos Creator games.
Instructions
Type a string into whatever widget currently has focus.
Ideal for filling name-entry fields, high-score initials, chat boxes. The text is emitted one char at a time via the keyboard API, so IME/input-event handlers fire per character.
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": {
"url": "<url>",
"text": "<text>"
},
"name": "cocos_type_preview"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| text | Yes | ||
| wait_ms | No | ||
| viewport_width | No | ||
| viewport_height | No | ||
| timeout_ms | No |