Skip to content

Keep Moonlight mouse and keyboard inside the RDP session - #41

Merged
mlopezsegura merged 1 commit into
masterfrom
fix/input-rdp-session
Nov 8, 2026
Merged

mlopezsegura merged 1 commit into
masterfrom
fix/input-rdp-session

Conversation

@mlopezsegura

Copy link
Copy Markdown
Collaborator

Fixes #39.

With the Virtual HID Driver installed and licensed, Sunshine creates a driver-backed HID mouse and keyboard. Windows routes HID input to the console session, so Moonlight moved the host's cursor instead of the RDP session's.

Updates the bundled Sunshine/sunshine.exe to Sunshine-Web-RTC fix/input-rdp-session (OpenstreamCo/Sunshine-Web-RTC#6, merged with the latest origin/master). Outside the console session, mouse and keyboard now use SendInput, which stays in Sunshine's own session. Gamepads, touch and pen are unchanged.

Testing

  • Builds locally (MSYS2 UCRT64, Release), stripped like before.
  • Moonlight in an RDP session: relative/absolute mouse, buttons, wheel, keyboard, unicode text, UAC prompt; host cursor stays still.
  • Confirmation from the reporter (needs a licensed Virtual HID Driver).

🤖 Generated with Claude Code

With the Virtual HID Driver installed and licensed, Sunshine created a
HID mouse and keyboard, and Windows sends HID input to the console session:
the client moved the host's cursor instead of the session's (#39).

Update the bundled sunshine.exe: Sunshine-Web-RTC fix/input-rdp-session
(PR #6, merged with the latest origin/master). Outside the console session
mouse and keyboard now use SendInput, which stays in Sunshine's own session.
Stripped like before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mlopezsegura
mlopezsegura merged commit 5c47b0c into master Nov 8, 2026
1 check passed
@grichecth

grichecth commented Nov 8, 2026 •

Copy link
Copy Markdown

I have a license for the Virtual HID driver so I can test this. Do I just overwrite my sunshine.exe with this one? Or should I just wait for the release? I overwrote the Sunshine.exe and it now works perfectly. Thank you!

@mlopezsegura
mlopezsegura deleted the fix/input-rdp-session branch November 8, 2026 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Moonlight input not in session

2 participants