ui_send_keys_focused
Send keyboard input to the focused UI element after ui_set_focus to avoid repeated searches for complex controls like DataGrid.
Instructions
Send keyboard input to the currently focused element.
Use this AFTER ui_set_focus to avoid re-searching for complex elements like DataGrid that may timeout on repeated searches.
Workflow:
ui_set_focus(automation_id="MyElement") # Focus the element
ui_send_keys_focused(keys="^{END}") # Send keys without re-search
Key syntax (modifiers are PREFIX characters, special keys in braces):
^ = Ctrl, % = Alt, + = Shift
Alt+Z: "%z" Ctrl+C: "^c" Shift+Tab: "+{TAB}"
Special: {ENTER} {TAB} {ESC} {DELETE} {BACKSPACE}
Arrows: {LEFT} {RIGHT} {UP} {DOWN}
Navigation: {HOME} {END} {PGUP} {PGDN}
Combined: Ctrl+End = "^{END}", Ctrl+Home = "^{HOME}"
Physical keypad: {NUMPAD0} ... {NUMPAD9}, {NUMPADADD}, {NUMPADSUBTRACT}, {NUMPADMULTIPLY}, {NUMPADDIVIDE}, {NUMPADDECIMAL}, {NUMPADENTER}, {NUMLOCK} (press/release)
IMPORTANT: For Alt+Z send "%z" (NOT "{ALT}z").
Args: keys: Keys to send (see syntax above)
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_focused"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | Yes |