crosspad_input
Send one input event to the running PC simulator. Pick an action (pad, encoder, click, key) and supply only the required fields. Ensure simulator is running first.
Instructions
[PC sim] Send one input event to the running PC simulator (consolidated; replaces 7 v5 tools). Pick an action, then supply ONLY the fields it needs — extras are ignored. Required fields per action:
• pad_press → pad (velocity optional, default 127)
• pad_release → pad
• encoder_rotate → delta (positive=CW, negative=CCW)
• encoder_press → (none)
• encoder_release → (none)
• click → x, y
• key → keycode (SDL keycode int)
Requires the simulator to be running (crosspad_run first).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Required for action=click. X pixel coordinate (0 = left). | |
| y | No | Required for action=click. Y pixel coordinate (0 = top). | |
| pad | No | Required for action=pad_press|pad_release. Pad index 0-15. | |
| delta | No | Required for action=encoder_rotate. Positive=CW, negative=CCW. Typical range -10..10. | |
| action | Yes | Which input event to dispatch. Required params — pad_press: pad (velocity?); pad_release: pad; encoder_rotate: delta; encoder_press/encoder_release: (none); click: x,y; key: keycode. | |
| keycode | No | Required for action=key. SDL keycode (e.g. 27=ESC, 32=SPACE, 13=RETURN). | |
| velocity | No | Optional for action=pad_press (default 127). Ignored for other actions. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| success | Yes |