Expand description
Linux synthetic text input.
Corrections are applied by shelling out to wtype, which drives the
Wayland virtual-keyboard-v1 protocol. (A native, dependency-free
implementation of that protocol is a later refinement — see
DESIGN.md.)
Enums§
- Emit
Error - An error applying a text replacement.
Functions§
- anchored_
replace_ with_ delay - Replace a word at a known position relative to end-of-line.
chars_from_endis the number of Left arrows needed to walk from end-of-line back to the END of the word to replace;word_charsis the BackSpace count to remove the word once the cursor is on it. - replace
- Apply an edit at the caret: press Backspace
backspacestimes, then typetext. Uses the default per-backspace pause. - replace_
around_ caret_ with_ delay - Like
replace_with_delaybut also emits Delete keys (right of the caret) before typing the replacement. Used by fix-word / fix-sentence when the caret is INSIDE a word or sentence: we can’t backspace away text on the right side of the caret, so we hand the focused appBackSpace × NthenDelete × Mthen the new text. - replace_
with_ delay - Like
replace, but lets the caller set the pause-per-backspace in milliseconds. The pause is applied as a single sleep between the backspace burst and the replacement-text burst, scaled by the number of backspaces so longer edits wait proportionally longer.