Focus a window and send key sequences (verified)
window_keysSend keyboard shortcuts to a specific Linux window: resolve the target, verify focus, then inject key sequences via wtype for menus or TUI navigation.
Instructions
One-shot keyboard shortcuts to ANY window: resolve + verify-focus target, then inject keys via wtype. Each step is a keysym with optional modifiers joined by "+": "Return", "Escape", "Tab", "ctrl+p", "alt+shift+e". For menus and TUI navigation (e.g. ctrl+p in opencode).
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": "window_keys"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | Yes | key steps, e.g. ["ctrl+p","Return"] | |
| match | No | ||
| address | No |