inject_input
Dispatch keyboard, mouse, and touch events to the running game instance to drive interactions such as pressing keys, clicking, dragging, or tapping. Use after launch_start to test and verify behavior.
Instructions
Dispatch keyboard / mouse / touch input to the RUNNING Launch instance so you can drive end-to-end interactions ("press W to move", "click a button", "tap the screen"). Requires launch_start first. Events run in order; coordinates are CSS pixels from the canvas top-left (match capture_runtime's framing). Returns { dispatched }. Patterns: key press with holdMs to move for a duration; mouse click at (x,y); a down→move…→up sequence for dragging; touch tap for mobile UI. After injecting, use capture_runtime / read_runtime_logs / query the scene to observe the effect. When NOT to use: to change entity data directly (use modify_entities) or before launch_start.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| events | Yes | Ordered list of input events to dispatch | |
| betweenMs | No | Delay between consecutive events (default 0) |