send_input
Simulates keyboard and mouse input in a running LÖVE2D game, letting AI players move, attack, and click by sending key or mouse events.
Instructions
Simulate keyboard or mouse input in the game, letting the AI actually play (move, attack, click, etc). type must be one of: key_down, key_up, mouse_move, mouse_down, mouse_up.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| key | No | LÖVE KeyConstant, e.g. 'left', 'space', 'a' | |
| type | Yes | ||
| button | No | 1 = left, 2 = right, 3 = middle | |
| duration | No | Optional: auto-release the key after N seconds |