keyboard
Send text or key combinations to a chosen app window, letting AI agents type and trigger shortcuts while preserving the user's focus.
Instructions
Keyboard to an app. action='type' (text, unicode-safe) |
'key' (keys combo: 'ctrl+shift+t', 'esc', 'F5'; aliases
enter/esc/tab/backspace/pgup/pgdn/arrows, else XKB keysyms). Pass
window (an address from desktop) so keystrokes land in the intended
app rather than whatever currently holds focus. The window the human
is in is focused and typed into on their screen. Any other window gets
the keys in the background, with the human's focus left alone: text
goes into its text field through the accessibility interface, or key
by key through Hyprland's sendshortcut (a character the keyboard layout
has no key for is refused on that path). Keys sent that way, and key
combos, go to the control the app itself has focused, which is not the
field text went into through accessibility: focus a field first with
click_ui. Without window, keys go to
the focused window. background true or false forces one way. This
drives shortcuts the focused application handles
(ctrl+t, ctrl+l). It does NOT trigger Hyprland's own keybinds
(super+...): those go through use_bind, and workspace/window actions
through hypr. then ('desktop'|'screenshot'|'ui'|'none') appends the
result to this call. allow_auth=true overrides the default refusal to
type into a password field or a system authentication dialog (only when
a human intends that credential entry).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | No | ||
| text | No | ||
| then | No | none | |
| action | Yes | ||
| window | No | ||
| allow_auth | No | ||
| background | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |