Repository navigation
Games using Raw Input have broken mouse drag/zoom on headless setups with no physical mouse #4792
Description
Activity
Seeing the same issue on a Linux machine. The docs do mention that plugging in a physical mouse should fix the weirdness we're seeing. However, the issue consistently happens on my end now, and I don't remember it being consistent before.
Mostly seeing this on Zen Browser (based on Firefox), not on Chromium-based ones.
Running
2026.226.41312, commit98dc21954ea0c254f058ef5b3b3ec6aef359e2aaon Hyprland. Don't have the time to bisect now unfortunately.+1
It seems this issue hasn't had any activity in the past 90 days. If it's still something you'd like addressed, please let us know by leaving a comment. Otherwise, to help keep our backlog tidy, we'll be closing this issue in 10 days. Thanks!
Still relevant, although it's not happening anymore when "Optimize mouse for remote desktop" is disabled. Pretty sure it was working regardless of this mode before though.
Sunshine foundation solved it by adding virtual mouse driver
I do have the virtual mouse driver, but it is only effective if not using the "optimized for remote desktop" setting :( couldn't troubleshoot this further but I'd love to dig deeper if there's anything I could help with. Could be obvious, sorry if I missed something.
Ah, isn't this Windows specific ? I'm primarily using Linux and macOS, not sure if that will work. Also I'd like to avoid using vibe coded software on my personal machines, I believe this one is. Not sure though.
This is marked as fixed but I believe it isn't actually fixed on platforms other than Windows?
I definitely still have the issue on Linux and macOS was flaky (not necessarily blaming Sunshine here, but still noteworthy)This is a Windows specific issue, SendInput is a Windows API. https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendinput
Ah. All my comments were about Linux, I didn't know if it was the exact issue as the OG post but it seemed very similar. Not sure if I should track it somewhere else. Will open another issue if it happens again in Linux for me.

Is there an existing issue for this?
Is your issue described in the documentation?
Is your issue present in the nightly release?
Describe the Bug
On a headless Windows setup with no physical mouse connected, games that use the Raw Input API (
WM_INPUT) for map/camera controls have broken mouse input when streaming via Sunshine + Moonlight.Symptoms:
Root cause:
Sunshine injects mouse input via
SendInput(). When no physical mouse device is present in Windows, the Raw Input subsystem does not properly dispatchWM_INPUTmessages fromSendInput()because there is no hardware device to attribute the events to.SendInput()still moves the system cursor and generatesWM_MOUSEMOVE(which is why GUI works), but games readingWM_INPUTfor map controls receive nothing or default values (explaining the zoom centering on 0,0).Proof:
Plugging any USB mouse into the host machine immediately fixes the issue — even without using the mouse. Simply having a physical mouse device present causes Windows to properly route
SendInput()events through the Raw Input pipeline.Tested and ruled out:
Suggested Fix
Sunshine already uses ViGEmBus to create virtual gamepad devices. A similar approach for mouse input — creating a virtual HID mouse device instead of (or in addition to) using
SendInput()— would make the injected input appear as real hardware to Windows, ensuring properWM_INPUTdispatch regardless of whether a physical mouse is connected.Alternatively, Sunshine already detects the no-mouse condition for cursor visibility (Mouse Keys workaround in PR #721). This detection could be extended to warn users that some games may have input issues without a physical mouse present.
Expected Behavior
Games using the Raw Input API should receive proper mouse input from Sunshine regardless of whether a physical mouse is connected to the host.
Steps to Reproduce
Host Operating System
Windows
Operating System Version
Windows 11 Pro
Apps
Nexus 5X (Steam App ID 1983990) — likely affects any game using Raw Input API for camera/map controls