Skip to content

feat(input): update libvirtualhid integration - #5563

Open
ReenigneArcher wants to merge 2 commits into
masterfrom
feat/libvirtualhid-updates
Open

feat(input): update libvirtualhid integration#5563
ReenigneArcher wants to merge 2 commits into
masterfrom
feat/libvirtualhid-updates

Conversation

@ReenigneArcher

@ReenigneArcherReenigneArcher commented Aug 27, 2026

Copy link
Copy Markdown
Member

Description

  • add driver-backed HID keyboard lifecycle and license refresh handling
  • advertise Switch Pro motion support and forward player LED feedback
  • bump libvirtualhid and the minimum supported Windows driver version

TODO:

  • update min Virtual HID Driver version after next release

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

See our AI usage policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Renamed the license-state refresh flow from mouse-only to shared virtual input so Sunshine now recreates both libvirtualhid keyboard and mouse devices, including resetting keyboard/mouse state before refresh. Added explicit keyboard refresh support in the virtualhid input context and wired config HTTP license updates to trigger the full refresh.
Updated Windows-facing messaging and docs to describe Raw Input keyboard + mouse support, added troubleshooting guidance for keyboard detection, and adjusted tray/UI localization strings accordingly. Also bumped the minimum supported Virtual HID Driver version to 2026.826.2024.22, updated related unit tests, and advanced the libvirtualhid submodule.
@codecov

codecovBot commented Aug 27, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 91 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle nameSizeChange
sunshine-esm880.42kB91 bytes (0.01%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: sunshine-esm

Assets Changed:

Asset NameSize ChangeTotal SizeChange (%)
assets/logo-*.js91 bytes385.36kB0.02%

Files inassets/logo-*.js:

  • ./src_assets/common/assets/web/public/assets/locale/en.json → Total Size: 46.93kB

@codecov

codecovBot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.33333% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.85%. Comparing base (377e07c) to head (923eb82).
✅ All tests successful. No failed tests found.

Files with missing linesPatch %Lines
src/stream.cpp16.66%10 Missing ⚠️
src/confighttp.cpp0.00%1 Missing ⚠️
src/platform/linux/input/virtualhid.cpp0.00%0 Missing and 1 partial ⚠️
src/platform/virtualhid_input.cpp97.77%1 Missing ⚠️
src/platform/windows/input.cpp0.00%0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@ Coverage Diff @@## master #5563 +/- ##
==========================================
+ Coverage 33.65% 33.85% +0.19% 
==========================================
Files 104 104 Lines 25125 25190 +65 Branches 11118 11144 +26 ==========================================
+ Hits 8457 8528 +71 - Misses 13824 15712 +1888 + Partials 2844 950 -1894 
FlagCoverage Δ
Archlinux0.00% <0.00%> (ø)
FreeBSD-amd6419.65% <64.70%> (+0.19%)⬆️
Homebrew-macos-1431.01% <72.58%> (+0.24%)⬆️
Homebrew-macos-1531.70% <72.58%> (+0.23%)⬆️
Homebrew-macos-2631.82% <72.58%> (+0.23%)⬆️
Homebrew-ubuntu-24.0420.92% <64.91%> (+0.15%)⬆️
Linux-AppImage20.34% <64.91%> (?)
Windows-AMD6425.94% <64.70%> (+0.16%)⬆️
Windows-ARM6421.86% <58.73%> (+0.19%)⬆️
macOS-arm6425.90% <64.70%> (+0.32%)⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing linesCoverage Δ
src/input.cpp31.18% <100.00%> (+0.50%)⬆️
src/input.h50.00% <ø> (ø)
src/platform/common.h60.44% <100.00%> (+1.85%)⬆️
src/platform/macos/input.cpp85.71% <100.00%> (ø)
src/platform/virtualhid_input.h0.00% <ø> (ø)
src/system_tray.cpp80.51% <100.00%> (+0.23%)⬆️
src/confighttp.cpp54.33% <0.00%> (ø)
src/platform/linux/input/virtualhid.cpp75.60% <0.00%> (ø)
src/platform/virtualhid_input.cpp97.74% <97.77%> (+0.24%)⬆️
src/platform/windows/input.cpp16.66% <0.00%> (ø)
... and 1 more

... and 40 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 377e07c...923eb82. Read the comment docs.

@github-actions

github-actionsBot commented Aug 28, 2026

Copy link
Copy Markdown
Last Updated2026-08-28 16:46:07 UTC
Source RunCI Run #5142
Commit923eb82c7b9917399ce6921653547dc80bac8774

Screenshot Comparison

PR #5563 screenshots vs screenshots baseline.

Matrix: AppImage

ImageBaselinePR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-AMD64

ImageBaselinePR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-ARM64

ImageBaselinePR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-arm64

ImageBaselinePR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

@ReenigneArcher
ReenigneArcherforce-pushed the feat/libvirtualhid-updates branch from 596fbf9 to 91434daCompareAugust 28, 2026 01:16
Introduce a new gamepad feedback path for player indicator LEDs, including a new feedback message type, control-stream packet encoding (0x5504), and virtual HID output handling with deduplication of repeated LED states. Broaden controller extension capability detection from touchpad-only to touchpad-or-motion and use it consistently across Linux, macOS, and Windows capability reporting. Update unit tests to cover both touchpad support and controller extension advertising, plus player LED routing/dedup behavior, and bump the libvirtualhid submodule.
@ReenigneArcher
ReenigneArcherforce-pushed the feat/libvirtualhid-updates branch from 91434da to 923eb82CompareAugust 28, 2026 15:51
@ReenigneArcherReenigneArcher changed the title feat: libvirtualhid updatesfeat(input): update libvirtualhid integrationAug 28, 2026
@sonarqubecloud

Copy link
Copy Markdown

Sign up for freeto 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.

1 participant

@ReenigneArcher