key
Send keystrokes, key combinations, or text to a specified Hyprland app, with support for modifiers, repeat counts, and raw keycodes.
Instructions
Compatibility alias for press_key. Accepts key, keys, modifiers, keycode, or text.
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": {
"app": "<app>"
},
"name": "key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | App name, Hyprland class/title, pid, or address:0x... selector. | |
| key | No | Key or key-combination to press. | |
| keys | No | Compatibility shortcut string, for example alt+left. | |
| text | No | Compatibility key text. | |
| repeat | No | Number of times to repeat the key. Defaults to 1. | |
| keycode | No | Raw evdev keycode, ydotool-style. | |
| modifiers | No | Optional modifiers when key is a bare key, for example alt. | |
| confirmation_token | No | Externally approved, one-time challenge ID from request_confirmation for a high-risk action. |