Make input sidecars compositor-agnostic via /dev/uinput #59
No reviewers
Labels
No labels
bug
duplicate
enhancement
future
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
albert/shepherd-launcher!59
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "u/albert/58/wayland-generic-sidecars"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The touch-to-mouse and gamepad bridges emitted synthetic input through
wlroots-only Wayland protocols (zwlr_virtual_pointer_v1,
zwp_virtual_keyboard_v1), so they only worked under Sway and refused to
run on GNOME/Mutter, KWin, etc.
Replace that last hop with a kernel /dev/uinput virtual device, which is
consumed by every compositor (and X11) through libinput. Both bridges
already produce raw evdev codes, so the payload maps almost 1:1 and the
xkb-keymap upload hack is gone — the compositor applies the user's own
layout to raw keycodes.
trait, and UinputSink backend (relative pointer+keyboard for gamepad,
absolute pointer for touch).
drop all wayland-client / wayland-protocols-* dependencies.
to /dev/uinput, installed by a new
shepherd install udevsubcommand(also run by
install all); document in INSTALL.md.Verified: cargo fmt, clippy -D warnings, build, and unit tests pass.
Runtime behavior (absolute pointing, scroll feel) still needs validation
on real GNOME/KWin hardware.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Fixes #58
Make input sidecars compositor-agnostic via /dev/uinput (#58)to Make input sidecars compositor-agnostic via /dev/uinputManual testing that needs to be done:
On controllers whose D-pad is a hat with no native D-pad buttons (e.g. the Legion Go S, ABS_HAT0X/0Y), gilrs's default axis_dpad_to_button filter rewrites the hat into Button::DPad{Up,Down,Left,Right} events and drops the original AxisChanged(DPadX/Y). Both presets read the D-pad only via the DPadX/DPadY axes, so on those controllers the D-pad did nothing. Add a dpad() helper that resolves the D-pad from either delivery form (hat axis or DPad buttons, button wins) and route both presets through it (productivity -> arrow keys, GPD -> scroll). Pre-existing bug, unrelated to the uinput migration; surfaced by hardware testing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>This change appears to have regressed the touch bridge with HiDPI displays, particularly when the XWayland DPI mitigation is active
@albert wrote in #59 (comment):
This is fixed now