Send Input Event
send_input_eventInjects button, key, or gesture input events into a Meshtastic device UI to simulate physical presses for testing and automation.
Instructions
Inject an InputBroker event (button / key / gesture) into the device UI.
Drives the same code path as a physical button press.
Returns {ok, event_code, kb_char}.
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": {
"event_code": "<event_code>"
},
"name": "send_input_event"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Serial port or `tcp://host[:port]`; omit to auto-select the one likely Meshtastic device. | |
| kb_char | No | A character code (0..255) to type with the event. | |
| touch_x | No | Touch x coordinate (0..65535), for a tap such as `USER_PRESS`. | |
| touch_y | No | Touch y coordinate (0..65535). | |
| event_code | Yes | A numeric event code (0..255) or a name like `"RIGHT"`, `"SELECT"`, `"FN_F1"`. Common codes: SELECT=10, UP=17, DOWN=18, LEFT=19, RIGHT=20, CANCEL=24, BACK=27, FN_F1..F5=241..245. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| kb_char | Yes | ||
| event_code | Yes | the numeric code a name resolved to |