Mirror forwarded input devices to uinput

Mirror the gamepad forwarded from the headset to a uinput device with the standard Xbox layout, so applications that do not read it through OpenXR, such as SDL and Steam Input, pick it up. This extends the existing hid-forwarding uinput path, which already covered keyboard and mouse.

The headset chooses which devices to forward (keyboard, mouse, gamepad), off by default. The hid-forwarding server option gates the uinput mirror only; the OpenXR gamepad is always exposed. The mirror needs the uinput module and write access to /dev/uinput.

Gamepad rumble written to the uinput device is read back and forwarded to the headset as OpenXR haptics.
This commit is contained in:
JR Lanteigne
2026-07-08 19:10:50 +02:00
committed by xytovl
parent aeecc857de
commit 91f6e69ffb
18 changed files with 385 additions and 54 deletions
+8 -1
View File
@@ -136,7 +136,14 @@ Default value: `false`
Only available when the `uinput` kernel module is loaded and the user has write access.
Enables the forwarding of keyboard and mouse input from the client to the server.
Mirrors input devices forwarded from the headset (keyboard, mouse, gamepad) to `uinput`
devices, for applications that do not read them through OpenXR. Which devices are forwarded is
chosen on the headset.
A forwarded gamepad is also exposed as a native OpenXR gamepad at `/user/gamepad`, which needs
no permission and is always available. Only the digested controller state is forwarded
(buttons, two sticks, analog triggers and a d-pad), so device specific features such as gyro,
adaptive triggers or the touchpad are not available.
## `debug-gui`
Default value: `false`