Repository navigation
Add keyboard and mouse input - #1
Merged
Merged
Conversation
Clicking the picture captures the pointer and, in fullscreen, the keyboard. Keys, raw relative mouse motion, all five buttons and both wheels go to the PC as Moonlight input packets on Sunshine-Web-RTC's new "input" DataChannel; Ctrl+Alt+Shift+Z or holding Esc gives them back, and everything held is released when the capture ends, the window loses focus or the stream stops. Servers without the channel keep working with gamepads only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot
pushed a commit
that referenced
this pull request
Nov 8, 2026
Clicking the picture captures the pointer and, in fullscreen, the keyboard. Keys, raw relative mouse motion, all five buttons and both wheels go to the PC as Moonlight input packets on Sunshine-Web-RTC's new "input" DataChannel; Ctrl+Alt+Shift+Z or holding Esc gives them back, and everything held is released when the capture ends, the window loses focus or the stream stops. Servers without the channel keep working with gamepads only. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
mlopezsegura
added a commit
that referenced
this pull request
Nov 10, 2026
Clicking the picture captures the pointer and, in fullscreen, the keyboard. Keys, raw relative mouse motion, all five buttons and both wheels go to the PC as Moonlight input packets on Sunshine-Web-RTC's new "input" DataChannel; Ctrl+Alt+Shift+Z or holding Esc gives them back, and everything held is released when the capture ends, the window loses focus or the stream stops. Servers without the channel keep working with gamepads only. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
mlopezsegura
added a commit
that referenced
this pull request
Nov 10, 2026
Clicking the picture captures the pointer and, in fullscreen, the keyboard. Keys, raw relative mouse motion, all five buttons and both wheels go to the PC as Moonlight input packets on Sunshine-Web-RTC's new "input" DataChannel; Ctrl+Alt+Shift+Z or holding Esc gives them back, and everything held is released when the capture ends, the window loses focus or the stream stops. Servers without the channel keep working with gamepads only. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Keyboard and mouse now work natively, as in a Moonlight client.
web/input.mjsturns events into Moonlight input packets: keys by the Windows virtual-key code of their US-layout position (the PC's layout gives them meaning; Ñ and< >included), relative motion with sub-pixel carry-over, all five mouse buttons, vertical and horizontal wheel at 120 units per notch. Held keys repeat on the PC, so browser auto-repeat is not sent.inputDataChannel (feat(webrtc): accept keyboard and mouse on an input DataChannel Sunshine-Web-RTC#5). With older servers the channel is absent and the client works as before, gamepads only.Testing
npm test: 11 passed, including new packet-layout andKeyboardMousetests.pointermoveis used rather thanpointerrawupdate: in testing the first raw update of a burst came without its motion.🤖 Generated with Claude Code