type_text
Types text into a specified window after confirming focus; verifies characters were received correctly by reading back the widget, preventing layout-related key transposition errors.
Instructions
Type into a named window. Focus is confirmed first, nothing is typed if it cannot be confirmed, and the widget is read back afterwards to check the right characters arrived. Characters go to the compositor as keysyms, so the keyboard layout cannot transpose them -- the German-QWERTZ hazard that made ydotool type z for y does not apply to this path. ui_set_text is still better where it works: it hands text to the widget and needs no focus at all.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| via | No | auto prefers compositor keysyms and falls back to ydotool. | auto |
| look | No | What to show you afterwards. Default "auto": wait for the screen to stop changing, measure how much this action changed, and attach a picture of the affected window only if something did change -- so a click that hit nothing costs no tokens and says so. "window" always attaches it, "screen" uses the whole desktop (slower, 6x the tokens), "region" uses look_at, false skips all of it. Use false for the middle of a sequence you are going to check at the end anyway. | auto |
| text | Yes | Literal text to type | |
| target | Yes | Window id from list_windows, or a wm_class / title fragment. The window is activated and focus is CONFIRMED before any key is sent; if focus does not land, nothing is typed. | |
| look_at | No | Rectangle for look:"region", in screen pixels. Object form {x, y, width, height} or array form [x, y, width, height]. | |
| verify_app | No | AT-SPI application name to read back for verification; auto-detected from the window if omitted | |
| key_delay_ms | No | ||
| settle_max_s | No | How long to wait for the screen to stop changing before looking. Raise it for an app that animates slowly; set it to 0 to capture immediately. |