Skip to content

Input closed-loop tests via an echo receiver app #132

Description

@jonocodes

Context

The Playwright e2e (client/e2e/kbd-mode.spec.ts) deliberately shadows the uinput sink to LoggingKeySink (PYTHONPATH=scripts/no-evdev), so it asserts "the daemon decided to inject keystroke X" — never "keystroke X landed in the focused app." The uinput ↔ focused-app boundary (keys, pointer moves, clicks, drag-lock, scroll, macros) has zero real coverage. This is the desktop half of the input path.

Ask

Build a tiny purpose-built receiver GUI app that echoes every input event it gets (key combos, pointer position, button state, scroll delta) to a file or socket. Then close the loop:

phone-side button press / trackpad drag / jog → daemon injects via real uinput → echo-app records the event → test asserts it matches (right key, right coordinates, right button/drag state).

  • Reusable across every input primitive (press, key, type, pad, pad_tap, pad_drag, jog/jog_end, macros).
  • Needs /dev/uinput write access + a display to focus the echo-app; belongs in the same nightly/opt-in desktop-integration lane as Desktop-integration tests on a nested/headless compositor #131, not the PR gate.
  • Skip cleanly when uinput isn't available (mirrors just check-uinput / the graceful no-op degrade in input.py).

Tier C of the desktop-integration testing plan — the only way to test injection for real, since the current e2e stops one step short by design. Discussion in #127; companion to #131.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinput-injectionSynthetic input via uinput or platform equivalent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions