ui_send_keys_batch
Sends multiple key sequences in one call while holding UI focus, preventing terminal focus theft between individual keystrokes. Use for arrow navigation, typing, and keyboard shortcuts.
Instructions
Send a batch of key sequences in a single call, holding focus throughout.
Solves the race condition where the terminal steals focus between individual send_keys calls. The bridge holds foreground + element focus for the entire batch, sending keys with configurable delay.
Use this for: arrow navigation (20x DOWN), typing sequences, keyboard shortcuts.
Args: keys: List of key strings, each sent separately with delay. Example: ["{DOWN}", "{DOWN}", "{DOWN}"] for 3 arrow presses. Physical keypad example: ["{NUMPAD1}", "{NUMPADADD}"]. automation_id: Target element to focus before sending. delay_ms: Milliseconds between each key (default 50ms).
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": {
"keys": "<keys>"
},
"name": "ui_send_keys_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | Yes | ||
| delay_ms | No | ||
| automation_id | No |