Two toggle buttons in the free corners of the D-pad press and hold the PC's
left or right mouse button until tapped again, for drag and drop, text
selection and window moves, with the touchpad moving the pointer in between.
- New input action "button" ({button, pressed}); the state carries
input.buttons. VirtualInput remembers which connection pressed each button.
- A click on a held button is ignored so a touchpad tap does not drop the
drag; the other button stays usable. Repeating a state is a no-op.
- A held button is always released: when its client disconnects (only its own
buttons), when the server stops, and in the client when the tab is left or
the page is hidden.
- Incoming states are set aside for 500 ms after a local tap, so a state
already in flight cannot undo the toggle for a moment.
- D-pad rows are equal-sized (minmax(0, 1fr)) so the corner buttons do not
stretch the top row.
tests/test_input.py covers the device logic and the full server (disconnect,
several clients); tests/test_ui_mouse_hold.py drives a real Chromium. Also
checked through the real uinput device with its pointer grabbed exclusively.
README (fr/en) and CLAUDE.md are updated.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>