send_key_sequence
Send key sequences with inline delays, state snapshots, screenshots, and signal monitoring in one call. Replaces repetitive send_input loops and separate verification for gameplay testing.
Instructions
Primary gameplay testing tool. Sends multiple raw keys and/or InputMap actions in one round-trip with inline checkpoints: {"wait": ms} delays, {"state": true} state snapshots, {"screenshot": "path"} captures, collectSignals for signal events. Replaces send_input/send_key loops with shell sleeps and separate verification calls. Requires run_interactive.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | Yes | Array of key names or control objects. Strings are key names (e.g., "a", "enter", "space"). Objects: {"action": "move_up"} sends an InputMap action (press+release; add "hold_ms": 300 to hold it, "strength" for analog), {"hold": "shift"}/{"release": "shift"} hold/release a raw key, {"wait": 500} inserts a delay in ms, {"screenshot": "/path/to/file.png"} captures a screenshot at that point, {"state": true} captures a game state snapshot. Example: [{"action": "jump"}, {"action": "move_right", "hold_ms": 500}, {"state": true}, {"wait": 1000}, {"screenshot": "/tmp/mid.png"}] | |
| delayMs | No | Default delay in milliseconds between each key press (default: 50). Individual waits in the keys array override this. | |
| collectSignals | No | Subscribe to signals during the sequence and return captured events in the response. Each entry specifies a node and its signals to monitor. |