keyboard
Control key input on a Windows desktop: press keys, trigger hotkeys, type Unicode-safe text, and hold/release keys. Optionally verify the foreground window handle to avoid typing into wrong app.
Instructions
Control the keyboard. action: press | hotkey | type | down | up. press: key name (enter, f11, a...); hotkey: keys=["ctrl","s"]; type: Unicode-safe text. expect_hwnd refuses (409) the action if the foreground window differs — use it to avoid typing into the wrong app.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "keyboard"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | ||
| keys | No | ||
| text | No | ||
| action | No | press | |
| interval | No | ||
| expect_hwnd | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |