Two independent text-injection bugs on Wayland:
1. Clipboard copy silently failed. wl-copy/xclip/xsel fork a background
process that keeps owning the selection; capturing its stderr with
subprocess.PIPE makes run() block on the surviving child until the
clipboard is next overwritten, so the call always hits its timeout and
_copy_to_clipboard reports failure even though the copy succeeded.
Redirect stdout/stderr to DEVNULL so run() only waits for the
short-lived foreground process.
2. ydotool scrambled text on non-US keyboard layouts. `ydotool type`
emits positional evdev keycodes that get re-interpreted through the
active layout (assumed US QWERTY), so dictated text came out garbled on
AZERTY/QWERTZ/Dvorak (e.g. "message" -> ",essqge") and non-ASCII was
dropped. Always inject via clipboard paste (Ctrl+V) for ydotool, which
is layout-independent and Unicode-safe.
Adds regression tests for both.
Claude-Session: https://claude.ai/code/session_01EhyratrEE4vDWhriirUB9k