esp_button
Press and hold or release a mouse button on the ESP32 HID device, enabling multi-step drags via repeated move calls until the button is released.
Instructions
Press and hold (down) or release (up) a mouse button, e.g. for a drag made of several esp_move calls. The device releases it after 30 s; held_input_released or user_interrupt on a later call means it was released: start over. Other tools refuse a button held this way (button_held).
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": {
"button": "<button>",
"state": "<state>",
"control_id": "<control_id>"
},
"name": "esp_button"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes | down = press and keep holding, up = release. | |
| button | Yes | ||
| control_id | Yes | From esp_control begin. |